my @nodes = (); while (<SRV>){ # skip blank lines s/\s+$//; s/^\s+//; next if /^$/; # validate records if (/.+/){ # change to suit push @nodes,$_; } else { printLog("ERROR Invalid record '$_'"); } }
In reply to Re^8: Clear the contents of the text file
by shroh
in thread Clear the contents of the text file
by shroh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |