in reply to chop/chomp bind too tightly
Note also, chomp() doesn't really act like a list operator when parens aren't used (unlike print(), warn(), reverse(), etc):
$ perl -MO=Deparse,-p -e 'chomp $a, $b' (chomp($a), $b); -e syntax OK $ perl -MO=Deparse,-p -e 'warn $a, $b' warn($a, $b); -e syntax OK $ perl -MO=Deparse,-p -e 'reverse $a, $b' reverse($a, $b); -e syntax OK $ perl -MO=Deparse,-p -e 'print $a, $b' print($a, $b); -e syntax OK
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re2: chop/chomp bind too tightly
by tye (Sage) on Nov 15, 2001 at 02:06 UTC |