Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: STDIN usage in interactive debug

by Fletch (Chancellor)
on Oct 24, 2021 at 09:06 UTC ( #11137951=note: print w/replies, xml ) Need Help??


in reply to Re: STDIN usage in interactive debug
in thread STDIN usage in interactive debug

Or you could even do it all in one line (without needing the close). . .

DB<1> @lines = do { open( my $fh, '<', 'FILE' ); <$fh> }

The cake is a lie.
The cake is a lie.
The cake is a lie.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2021-11-30 07:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?