Simon Oliver wrote:
> Lee Goddard wrote:
> > 
> > I'm away from my Camel books: could someone please let me 
> > know the way to globablly substitute a string over an
> > array, and leave the array as an
> > array?
>
> map s/x/y/g, @list;

Shame to have map build up a return array and then discard it. It's
considered by some to be bad style to use map in a void context; they
suggest substituting 'foreach'. In this vein:

    s/x/y/g for @list;

or

    foreach(@list) { s/x/y/g; }

.

Cheers,
Philip

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to