Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Converting a String to a FileHandle

by japhy (Canon)
on May 22, 2006 at 03:00 UTC ( [id://550857]=note: print w/replies, xml ) Need Help??


in reply to Converting a String to a FileHandle

Perl 5.8 can do this with open():
open my $fh, "<", \$string or die "can't read from \$string: $!"; while (<$fh>) { ... }
You're opening a reference to a scalar to read from.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Log In?
Username:
Password:

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

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

    No recent polls found