>>>>> "Robert" == Robert Hanson <[EMAIL PROTECTED]> writes:
Robert> You probably want to use "map".
Robert> This should work.
Robert> @body = map { s/foo/bar/; $_ } (@body);
No. Please don't answer without testing.
That messes up @body as well, since $_ is an alias back into the
original list.
This works:
s/foo/bar/ for @body;
presuming you have a reasonably modern Perl.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]