The variable $pos remains empty.... ?use Fcntl 'SEEK_SET'; use IO::File ; my $fh = IO::File->new($file) ; $fh->binmode() ; $fh->read($binrec, 15) ; $pos = $fh->getpos() ; print "pos = $pos\n" ; ...... $fh->seek($pos,SEEK_SET) ; # go back
In reply to HowTo retrieve the position in a file from the FH by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |