Help for this page

Select Code to Download


  1. or download this
    my @index;
    while (<BIGLOG>){
    ...
            : Mktime( unpack 'A4xA2xA2xA2xA2xA2', $_  );
        push @index, pack 'NN', $epoch, $offset;
    }
    
  2. or download this
    my( $offset, @index ) = 0; ## The first lines offset is zero
    while (<BIGLOG>){
    ...
        push @index, pack 'NN', $epoch, $offset; ## Pair with previous off
    +set
        $offset = tell BIGLOG;   ## and now get the start of the next line
    + 
    }