use Win32API::File qw( SetFilePointer GetOsFHandle ); sub BigTell { my( $fh )= @_; seek( $fh, 0, 1 ); # Flush buffers my $osf= GetOsFHandle( $fh ); my $hi= 0; my $lo= SetFilePointer( $osf, 0, $hi, 1 ); return pack "NN", $hi, $lo; } sub BigSeek { my( $fh, $pos, $whence )= @_; my $osf= GetOsFHandle( $fh ); seek($fh,0,1); # Flush buffers my( $posHi, $posLo )= unpack "NN", $pos; $posLo= SetFilePointer( $osf, $posLo, $posHi, $whence ) or return; return pack "NN", $posHi, $posLo; }