Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: how to populate array with last 20 lines of file

by thanos1983 (Parson)
on Aug 09, 2017 at 10:23 UTC ( [id://1197095]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
              'line 20',
              'line 21'
            ];
    
  2. or download this
    line 1
    line 2
    ...
    line 19
    line 20
    line 21
    
  3. or download this
    #!/usr/bin/perl
    use strict;
    ...
              'line 20',
              'line 21'
            ];
    
  4. or download this
    #!/usr/bin/perl
    use strict;
    ...
              'line 20',
              'line 21'
            ];
    
  5. or download this
    do {
        @data = check_file($filename, $numlines);
        sleep 5;
    } while ( grep not /$process/, @data );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found