In scalar context, only the first line is read, so change that to
my $line = <STDIN>;
In reply to Re: How do I read just one line of input
by moritz
in thread How do I read just one line of input
by prasaduco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |