In most of the cases we deal with text-files and read them sequentially from the beginning to the end, but sometimes we might need some more complex operations on files.
When you open a file for reading, the operating system maintains an internal variable, the current position in the file. Every read starts from this position and every read-operation updates the position.
The seekfunction provided by Perl allows you to move this position without actually reading the content of the file (so without the data transfer from the disk to the memory) and it also allows you to move the position backwards.
The accompanying tell function will always return the index of the current position in the file.
Perl Maven Pro - screencasts with articles
As a Perl Maven Pro subscriber you will enjoy a library of articles and screencasts.
Ad free browsing!
The articles contain topics such as Web Application Development, Object Oriented programming, testing, deployment, code walkthroughs, best practices, and many more subjects in Perl, and in related technologies.
Subscriptions include all previous pro episodes.
If you already have Perl Maven Pro subscription, you will need to login to access the articles.