in reply to Re: 'rewinding' file to get value from previous line in file?
in thread 'rewinding' file to get value from previous line in file?
my @Z; while (<DATA>) { my @token = split ' '; if ( $token[0] eq 'Z' ) { push @Z, [ $token[1] ] if !$Z[-1] || $token[1] != $Z[-1][1] + 1; $Z[-1][1] = $token[2]; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |