in reply to Re^7: Clear the contents of the text file
in thread Clear the contents of the text file
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 '$_'"); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Clear the contents of the text file
by poj (Abbot) on Jul 22, 2015 at 18:45 UTC |