Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 romping around the Monastery: (11)
As of 2016-08-25 12:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (360 votes). Check out past polls.