in reply to Matching next line in text file
my $stn; # current stn hash being constructed ... while (<IN>) { if (/^H/ || /^reclin/i) { if ($stn) { ...save $stn...; $stn = undef; # reset stn hash } } if (/^H/ ... /[<\[]/) { ... same code ... } next if (/^reclin/i); ... parse new $stn hash values ... $stn->{$s} = [ $x, $y, $z ]; } if ($stn) { ...save $stn... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Matching next line in text file
by YYCseismic (Beadle) on Jul 03, 2008 at 20:30 UTC | |
by pc88mxer (Vicar) on Jul 03, 2008 at 21:51 UTC |