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

Re: reading file into an array

by meetraz (Hermit)
on Jun 01, 2004 at 20:57 UTC ( [id://358596]=note: print w/replies, xml ) Need Help??


in reply to reading file into an array

The easiest and fastest possible way to do this is via File::Slurp.

use File::Slurp; my @array = read_file('filename.txt');

That's all there is to it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-26 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found