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

Re^6: Pointers and References

by davido (Cardinal)
on Nov 25, 2020 at 18:11 UTC ( [id://11124213]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $content = do {
        open my $fh, '<', $file or die "Couldn't open $file: $!\n";
        local $/ = undef;
        <$fh>;
    };
    
  2. or download this
    my $content;
    {
    ...
        local $/ = undef;
        $content = <$fh>;
    }
    
  3. or download this
    my $content = sub {
        my $file = shift;
    ...
        local $/ = undef;
        return <$fh>;
    }->($file);
    
  4. or download this
    ok 1;
    
    ...
    }
    
    ok 3;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-18 11:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found