in reply to print chomp <STDIN>
perldoc -f chomp
for an explanation.Even so, I suspect that
will not give you what you expect... Here it prints '1', not the chomped line from STDIN. Why, you ask? Because chomp returns the number of characters removed from the end of its argument(s). Again, see the documentation.print chomp (my $value = <STDIN>);
|
|---|