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>);
In reply to Re: print chomp <STDIN>
by broomduster
in thread print chomp <STDIN>
by redkar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |