Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^9: Question about binary file I/O

by TheMartianGeek (Novice)
on Mar 05, 2011 at 07:38 UTC ( [id://891546]=note: print w/replies, xml ) Need Help??


in reply to Re: Question about binary file I/O
in thread Question about binary file I/O

Hm...so there's no way to do that without the seek function? This has come up again; here, I need to write characters to a certain position. There isn't some writetowhatever(FILEHANDLE, $variable, NUMCHARS, $offset) function or anything that would make that possible with just one function instead of two or more?

Replies are listed 'Best First'.
Re^10: Question about binary file I/O
by tilly (Archbishop) on Mar 05, 2011 at 08:27 UTC
    Check perlfunc if you want. But the standard is to seek and then to write or syswrite. (The difference being whether you want to buffer your requests to write. Usually you do. Really.)
      I think you mean print (buffered by default) or syswrite (unbuffered)? write is not the opposite of read
        Gah, I've been playing with Python too much. You're right.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://891546]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-18 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found