Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Out of memory problem when copying contents of file into array

by Miguel (Friar)
on Feb 18, 2005 at 16:35 UTC ( #432393=note: print w/ replies, xml ) Need Help??


in reply to Out of memory problem when copying contents of file into array

Another alternative:

#!/usr/bin/perl -w use strict; use IO::All; my @reversed_io = io("file.txt")->backwards->getlines; my @lines; push @lines, $reversed_io[$_] for ( 0 .. 100 );


Comment on Re: Out of memory problem when copying contents of file into array
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2016-02-05 22:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (208 votes), past polls