Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Loading a part of the file to array using Tie::File

by ikegami (Patriarch)
on Nov 22, 2017 at 17:20 UTC ( [id://1204044]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open(my $fh, '|-', "tail", "-n", "+$InStartLineNumber", $InLogFIlePath
    +)
          or die("Can't tail \"$InLogFIlePath\": $!\n");
    ...
    if ( $? == -1  ) { die "Can't tail \"$InLogFIlePath\": $!\n"); }
    if ( $? & 0x7F ) { die "Can't tail \"$InLogFIlePath\": Killed by signa
    +l ".( $? & 0x7F )."$!\n"); }
    if ( $? >> 8   ) { die "Can't tail \"$InLogFIlePath\": Exited with err
    +or ".( $? >> 8 )."$!\n"); }
    
  2. or download this
    open(my $fh, '<', $InLogFIlePath) 
       or die("Can't open \"$InLogFIlePath\": $!\n");
    ...
       next if $. < $InStartLineNumber;
       ...
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1204044]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-19 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found