Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by Zaxo (Archbishop)
on Aug 29, 2003 at 14:52 UTC ( #287686=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $string = do {
        local $/;
        open local(*FILEHANDLE), 'somefile.txt' or die $!;
        <FILEHANDLE>
    };
    
  2. or download this
    my $string = do {
        local $/;
        open my $fh, 'somefile.txt' or die $!;
        <$fh>
    };
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://287686]
help
Chatterbox?
LanX is a dev version
[marto]: That reminds me, I made some notes somewhere with regard W::M::C, I'll get round to a PR when I've time to flesh it out
[Corion]: erix: But that makes for fun bug hunting. "What version of Chrome are you running?" "v62". "I also run v62 and it works on my machine". :-(
[Corion]: marto: Great, looking forward to the PR!
LanX wonders, do we have a rule against systematic down voting?
[erix]: we frown :)
[marto]: Does the command line arg --product-version@ help?
[LanX]: xD
[erix]: 'systematic' is going to be hard to define I think
[marto]: Err no @

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2017-12-12 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (335 votes). Check out past polls.

    Notices?