perl -e '@a=("frc.apmt","frc_ff.apmt");print join(q{,}, map(&subt($_), @a)), "\n"; sub subt {my ($a) = @_; $a=~s/^(.*)\..*/$1/; print "a=$a\n"; return $a;}' perl -e '@a=("frc.apmt","frc_ff.apmt");print join(q{,}, map(s/^(.*)\..*/$1/, @a)), "\n"; ' perl -e '@a=("frc.apmt","frc_ff.apmt");print join(q{,}, map(s/^(.*)\..*/\1/, @a)), "\n"; '
Can someone explain why the last two examples don't product the same output as the first? Thank you in advance. jwm -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>