Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: read file into scalar

by arkturuz (Curate)
on Oct 28, 2006 at 18:59 UTC ( [id://581102]=note: print w/replies, xml ) Need Help??


in reply to read file into scalar

Use File::Slurp. It has everything you need for simple file reading and writing, and the most simplified interface.

Replies are listed 'Best First'.
Re^2: read file into scalar
by mickeyn (Priest) on Oct 29, 2006 at 11:35 UTC
    follow an advice from 'Perl Best Practices' and use Perl6::Slurp.

    Enjoy,
    Mickey

      I follow my advice not to mess with unfinished programming languages and to-be-announced features :-)
      Anyway, thanks for the advice, I'll explore it.
Re^2: read file into scalar
by ysth (Canon) on Oct 30, 2006 at 18:43 UTC
    Everything you need except for locking, which this OP seems to need. Though if a lock isn't needed for the whole read/update data/write cycle, File::Slurp's atomic option may be enough.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-03-29 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found