IO::InnerFile(3) User Contributed Perl Documentation IO::InnerFile(3)

IO::InnerFile - define a file inside another file

    ### Read a subset of a file:
    $inner = IO::InnerFile->new($fh, $start, $length);
    while (<$inner>) {
        ...
    }

If you have a filehandle that can seek() and tell(), then you can open an IO::InnerFile on a range of the underlying file.

Class method, constructor. Create a new inner-file opened on the given FILEHANDLE, from bytes START to START+LENGTH. Both START and LENGTH default to 0; negative values are silently coerced to zero.

Note that FILEHANDLE must be able to seek() and tell(), in addition to whatever other methods you may desire for reading it.

Instance methods. Get/set the virtual length of the inner file.
Instance methods. Get/set the virtual start position of the inner file.
Instance methods. Standard filehandle methods.

$Id: InnerFile.pm,v 1.4 2005/02/10 21:21:53 dfs Exp $

Original version by Doru Petrescu (pdoru@kappa.ro).

Documentation and by Eryq (eryq@zeegee.com).

Currently maintained by Dianne Skoll (dfs@roaringpenguin.com).

2015-04-22 perl v5.34.0