UPDATE: docs say also It returns the total number of characters removed from all its arguments. but i see another thing:general>check_perl_distro c:/scripts/ideone-choroba.pl ----------------------------------------······· | (0,1,1). --------------------------------------------------------------------- +--······· [OK] C:\ulisse\strawberry\perl\bin\perl.exe ----------------------------------------······· | (0,1,1). --------------------------------------------------------------------- +--······· [OK] C:\ulisse\straw5.20-32b\perl\bin\perl.exe ----------------------------------------······· | (0,1,1). --------------------------------------------------------------------- +--······· [OK] C:\ulisse\straw64\perl\bin\perl.exe
perl -e "$a=qq(AA\n\n);$res = chomp $a; print qq(>$a< removed $res\n)" >AA < removed 1 ## maybe it means another thing: perl -e "$a=qq(AA\n\n);$b=qq(BB\n\n);$res = chomp ($a,$b); print qq(>$ +a< removed $res\n>$b< removed $res )" >AA < removed 2 >BB < removed 2
In reply to Re: Assigning the result of a chomp to the chomped var itself.
by Discipulus
in thread Assigning the result of a chomp to the chomped var itself.
by choroba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |