in reply to Assigning the result of a chomp to the chomped var itself.
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Assigning the result of a chomp to the chomped var itself.
by parv (Parson) on Nov 26, 2014 at 11:24 UTC | |
|
Re^2: Assigning the result of a chomp to the chomped var itself.
by Anonymous Monk on Nov 26, 2014 at 11:14 UTC | |
by Discipulus (Canon) on Nov 26, 2014 at 11:38 UTC | |
by Anonymous Monk on Nov 26, 2014 at 19:02 UTC | |
by Discipulus (Canon) on Nov 26, 2014 at 19:37 UTC |