>>>>> "Igor" == Igor Sutton Lopes <[EMAIL PROTECTED]> writes:

Igor>     my $str = join( " ", map { s/\B(\w+)/\L\1/; $_ } split( /\s+/,  $_ ) 
);

It's bad style to modify $_ in a map, because that also modifies the incoming
data.  The simplest workaround is adding local:

@out = map { local $_ = $_; s/.../.../; $_ } @in

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <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]
http://learn.perl.org/


Reply via email to