in reply to Re^2: File::Binary:howto goto a position in file
in thread File::Binary:howto goto a position in file
The output is: result: #! (thats no shift at all!)#! /usr/bin/perl use strict ; use Fcntl 'SEEK_SET'; use IO::File ; my $fh = new IO::File ; $fh->open("fio.pl") ; $fh->binmode() ; $fh->setpos(4) ; my $in ; $fh->read($in,2) ; printf "result: %s\n",unpack("A2",$in) ; $fh->close() ;
I miss the explanation of the 3 variables BUF, LEN and OFFSET ?$io->read ( BUF, LEN, [OFFSET] )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: File::Binary:howto goto a position in file
by ikegami (Patriarch) on Mar 13, 2006 at 01:37 UTC | |
by jeanluca (Deacon) on Mar 13, 2006 at 12:34 UTC | |
by ikegami (Patriarch) on Mar 13, 2006 at 15:13 UTC |