Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: File seek

by vinoth.ree (Prior)
on Feb 25, 2013 at 11:50 UTC ( #1020501=note: print w/ replies, xml ) Need Help??


in reply to Re^3: File seek
in thread File seek

seek (file, distance, from)

As you can see, seek requires three arguments:

file: which is the file variable representing the file in which to skip

distance: which is an integer representing the number of bytes (characters) to skip

from:which is either 0, 1, or 2

0 - The number of bytes to skip from beginning of the file.

1 - The number of bytes to skip from current location of the file.

2 - The number of bytes to skip from end of the file.

seek(CONFIRMEDOUTPUTFILE, -500, 2);

The above line skip backward 500 bytes from the end of the file.


Comment on Re^4: File seek
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2015-07-30 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls