Using seek function from IO:File : file seek « File « Perl






Using seek function from IO:File

    

use IO::File;
use IO::Seekable;

$filehandle = new IO::File;
$filehandle->open("<file.txt") or die "Cannot open file.txt";

$filehandle->seek(12, 0);

while (<$filehandle>){
    print;
}

$filehandle->close;

   
    
    
    
  








Related examples in the same category

1.Seek a file
2.Seek a minus value
3.Seek and tell.
4.Seek current position
5.Seek log file
6.The seek Function randomly accesses a file.
7.The seek Function randomly accesses a file: seek(FILEHANDLE, BYTEOFFSET, FILEPOSITION);
8.File seek operations
9.Move file pointer by using the seek function