in reply to Re: Perl Idioms Explained - my $string = do { local $/; <FILEHANDLE> };
in thread Perl Idioms Explained - my $string = do { local $/; <FILEHANDLE> };
Check here (tye solution) for why this may cause problems in some code.
Of course, you could shorten his solution slightly:
my $data= do { local( *ARGV, $/ ) = [ $filename ]; <> };
Globs are such fun. Hope this helps.
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
In Section
Meditations