Is there a way for the code to ignore the whitespace or any type of null in the data file?
while (<FILE>) { if ($_ =~ /^$/) { print "it's blank\n"; next; #process next line } else { print "it's NOT blank\n"; } }
if($_ =~ /^$/) can also be written as if(/^$/)
In reply to Re^3: Uninitialized Value
by vinoth.ree
in thread Uninitialized Value
by PilotinControl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |