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.