Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Empty STDIN does not exit while loop

by johngg (Canon)
on May 20, 2017 at 10:22 UTC ( [id://1190712]=note: print w/replies, xml ) Need Help??


in reply to Empty STDIN does not exit while loop

Another way would be to use eof.

... while ( not eof( STDIN ) ) { chomp( my $line = <> ); ... } ...

I hope this is of interest.

Update: Ignore this, I misread the question :-}

Cheers,

JohnGG

Log In?
Username:
Password:

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

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

    No recent polls found