How about this (untested):
my $energy; while (<FILE>) { last if /^\s+total/; unless ($energy) { $energy = /^\s+energy/; next } my @vals = split; # ... other stuff here }
In reply to Re: Reading column data from a file
by duff
in thread Reading column data from a file
by pattobw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |