Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Perl Idioms Explained - my $string = do { local $/; <FILEHANDLE> };

by Zaxo (Archbishop)
on Sep 03, 2003 at 02:42 UTC ( #288490=note: print w/replies, xml ) Need Help??


in reply to Re: Perl Idioms Explained - my $string = do { local $/; <FILEHANDLE> };
in thread Perl Idioms Explained - my $string = do { local $/; <FILEHANDLE> };

The truly modern PerlIO approach would be,     open my $fh, '<:raw', '/path/to/somefile.txt' or die $!;
but I'd do it with binmode still, right after opening.

After Compline,
Zaxo

  • Comment on Re: Re: Perl Idioms Explained - my $string = do { local $/; <FILEHANDLE> };
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://288490]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2019-02-19 22:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I use postfix dereferencing ...









    Results (105 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!