chomp operates in-place. The return value isn't especially useful.
use 5.010; say "enter some text lines"; while (my $line = <>) { say "\$line is [[$line]]"; say "doing the chomp thing!"; my $return = chomp $line; say "\$line is now [[$line]]"; say "\$return is [[$return]]"; }
In reply to Re: Chomp is removing the whole word instead of the newline
by tobyink
in thread Chomp is removing the whole word instead of the newline
by slayedbylucifer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |