Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: slurping into scalars

by thinker (Parson)
on Dec 16, 2002 at 10:15 UTC ( [id://220150]=note: print w/replies, xml ) Need Help??


in reply to slurping into scalars

Hi,

You want something like
#!/usr/bin/perl -w use strict; open FILE, "DATA.DAT" or die $!; my $scalar; { local $/=undef; # slurp mode on $scalar=<FILE>; } print $scalar;
hope this helps

thinker

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-19 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found