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

Re: How do I read an entire file into a variable?

by nate (Monk)
on Dec 29, 1999 at 00:09 UTC ( [id://1449]=note: print w/replies, xml ) Need Help??


in reply to How do I read an entire file into a variable?

I usually do it slightly differently:
open FILE "myfile"; my $data = join "", <FILE>; close FILE;

...but of course, there's more than one way to do it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-05-22 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found