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