in reply to problem with splitting file on whitespace: how to circumvent inconsistent formatting through file
Try:
while(<$FILE>) { chomp ($line = $_); # @columns = $line =~ m/\s*(-?\d+)/g; @columns = $line =~ m/\s*(-?[\d,]+)/g; }
Update: thanks to Lotus1 for the correction. I had it right on my computer, but failed to update the post.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: problem with splitting file on whitespace: how to circumvent inconsistent formatting through file
by Lotus1 (Vicar) on Jul 04, 2016 at 21:20 UTC | |
by angela2 (Sexton) on Jul 05, 2016 at 09:24 UTC |