Help for this page

Select Code to Download


  1. or download this
    use constant CHUNK => 4*1024;
    sub pseek {
    ...
       read( $p, $discard, $o-1 );
       return $o;
    }
    
  2. or download this
    open(FILE, $path) || die "$!\n";
    seek(FILE, $offset, 0);
    ...
        # do stuff
    }
    close FILE;
    
  3. or download this
    open(FILE, '-|', "$cat $file") || die "$!\n";