in reply to Re: Odd behaviour of chomp()
in thread Odd behaviour of chomp()
$ perl -e 'my $v = "foo\n"; $foo = chomp($foo); print "$foo\n";' 0
What would you expect this to print given that $foo is undefined when chomped? I consider this output to be entirely the correct result of that code. Why would you have it differ and in what way?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Odd behaviour of chomp()
by locked_user sundialsvc4 (Abbot) on Oct 21, 2015 at 14:06 UTC |