in reply to seek(UNDERSTANDING);
seek FILEHANDLE,POSITION,WHENCEThe moral of the story is if you ever stumble across something you "don't understand", don't just paste it in there, read up on it until you have a handle on what it does, at least in theory.
Sets FILEHANDLE's position, just like the fseek call of stdio. FILEHANDLE may be an expression whose value gives the name of the filehandle. The values for WHENCE are 0 to set the new position to POSITION, 1 to set it to the current position plus POSITION, and 2 to set it to EOF plus POSITION (typically negative). For WHENCE you may use the constants SEEK_SET, SEEK_CUR, and SEEK_END (start of the file, current position, end of the file) from the Fcntl module. Returns 1 upon success, 0 otherwise.
|
|---|