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]; } }
In reply to Re^2: 'rewinding' file to get value from previous line in file?
by ikegami
in thread 'rewinding' file to get value from previous line in file?
by Angharad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |