to this:while (<FHIN>) { $line=$_;
This will cause the while loop to skip to the next iteration for lines which are blank or only contain whilespace. In your case it's only the last line, but you can never trust user supplied data :)while (<FHIN>) { $line=$_; next if $line =~ s/^\s*$/;
/\/\averick
In reply to Re: Closing program when end of files is reached
by maverick
in thread Closing program when end of files is reached
by fgcr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |