Help for this page
my $curpos = 0; my @offset; ... while (<$fh>) { $offset[++$curpos] = tell $fh; }
seek $fh, $offset[$cur], 0;