while( my $line = <> ) { last unless $line =~ /\S/; # ... }
That is, your loop does not merely skip lines which do not contain non-blanks, it actually terminates as soon as it encounters one.
Makeshifts last the longest.
In reply to Re: Error message while reading from file
by Aristotle
in thread Error message while reading from file
by tamaguchi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |