SPUG: Reading a whole file into a scalar.
David H. Adler
dha at panix.com
Wed Jul 20 19:05:00 PDT 2005
On Wed, Jul 20, 2005 at 06:40:10PM -0700, David Dyck wrote:
> On Wed, 20 Jul 2005 at 18:19 -0700, Duane Blanchard <dblanchard at gmail.com>...:
>
> > ... I ... need a clever way ... to read the whole file into a scalar. ...
> >
> > Someone, please give a little pointer. Thanks,
>
> There is a great article at
>
> http://www.perl.com/pub/a/2003/11/21/slurp.html
There's even a module!
http://search.cpan.org/~uri/File-Slurp-9999.09/lib/File/Slurp.pm
dha
--
David H. Adler - <dha at panix.com> - http://www.panix.com/~dha/
Any country that has the words "play ball" in its national anthem
can't be all bad.
- Greg McCarroll
More information about the spug-list
mailing list