[wplug] Slightly OT- Perl issue

Tom Moertel tom at moertel.com
Sat Mar 12 00:04:22 EST 2005


Scott Husek wrote:
> If you don't like altering $/, try this:
> 
> $scalar = join('', <FILE>);

Here's an idiomatic approach that also preserves $/:

     $scalar = do { local $/; <FILE> };

Cheers,
Tom


More information about the wplug mailing list