Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: can some elaborate the difference between sysread/read sysseek/seek

by wjw (Curate)
on Sep 26, 2013 at 19:40 UTC ( #1055885=note: print w/replies, xml ) Need Help??


in reply to can some elaborate the difference between sysread/read sysseek/seek

Have never used either, but the way I read the docs

sysseek

and

sysread

implies that one
(seek) gets you to a place in the file measured in position units(unicode or bytes) and returns success or not,
and the other (read)
reads from that place for some length in position units(unicode or bytes).

So one gets you to where you want to start, and the other returns scalar data from the start position up to the length you ask for... Hope that is helpful...

  • ...the majority is always wrong, and always the last to know about it...
  • ..by my will, and by will alone.. I set my mind in motion
  • Comment on Re: can some elaborate the difference between sysread/read sysseek/seek

Replies are listed 'Best First'.
Re^2: can some elaborate the difference between sysread/read sysseek/seek
by Marshall (Abbot) on Sep 27, 2013 at 04:29 UTC
    sysread() is normally used for very low level I/O.
    Normally in Perl, you shouldn't be doing that.
    This is possible, but there are buffering complications.

    read() and seek() are much more normal.
    Do not mix read, seek or sysread and sysseek together.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055885]
help
Chatterbox?
[erix]: heh, you can record your tunes now, I hadn't seen that before
[erix]: and my solfège is a little rusty too
[stonecolddevin]: damn where's a working cblast? looks like several of them are out of commission
[erix]: Tanktalus home node has one

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2017-06-22 20:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (529 votes). Check out past polls.