Phoenix.pm: Three snippets

Eden Li eden.li at asu.edu
Thu May 3 20:09:03 CDT 2001


open FH, $file and do { local $/ = undef; $filestr = <FH>; close FH };

:)

From: "Webmaster" <webmaster at azwebs.com>
> Here's how I read a file into one string, but I think it can be shortened,
> if someone knows a trickier trick.
>
> open FILE, $file;
> $filestring = join('', (<FILE>));
> close FILE;




More information about the Phoenix-pm mailing list