Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by John M. Dlugosz (Monsignor)
on Sep 02, 2003 at 20:30 UTC ( #288428=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> };

How about opening it in binary mode? I would historically use a binmode after opening, but in 5.8 I should be able to use :raw or something like that. When I tried once, I spent a few minutes trying to make it work, and went back to the old way. What's the polished form of the idiom that uses the new syntax for binary files?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://288428]
help
Chatterbox?
[LanX]: good morning
[choroba]: LanX good indeed
[choroba]: very cloudy here, I planned to make some picrures, but now I don't think so
[LanX]: do you like it better now?
[choroba]: Well, getting used to it
[LanX]: several people told me they like saigon. ..

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2017-02-26 04:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (371 votes). Check out past polls.