in reply to Re^13: Question about binary file I/O
in thread Question about binary file I/O
I was hoping I could do it without needing seek(),
Why not just hide the seek inside a function of your own? Something like:
sub printAt { my( $fh, $src, $nChars, $offset ) = @_; seek $fh, $offset, 0; return print $fh substr $src, 0, $nChars; } printAt( $fh, $s, 4, 1234 );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^15: Question about binary file I/O
by TheMartianGeek (Acolyte) on Mar 05, 2011 at 22:11 UTC | |
by BrowserUk (Patriarch) on Mar 05, 2011 at 23:17 UTC | |
by TheMartianGeek (Acolyte) on Mar 05, 2011 at 23:55 UTC | |
by BrowserUk (Patriarch) on Mar 06, 2011 at 08:21 UTC |