my @index = ( pack 'd', 0 ); push @index, pack 'd', tell FILE while ; pop @index; my $index = join '', @index;