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

    I had already realized that but having it restated so nicely made me realize that this certainly contradicts the documentation [at the least, "chop LIST" and "chomp LIST" would need to be changed to "chop( LIST )" and "chomp( LIST)"] so I've now reported this to p5p as a bug as well. Thanks.

            - tye (but my friends call me "Tye")