Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Basic Input and Output

by Anonymous Monk
on Oct 20, 2001 at 20:32 UTC ( #120275=note: print w/ replies, xml ) Need Help??


in reply to Basic Input and Output

while(<>){ #reads lines until end of file or a Control-D from the keyboard .. unless you are on a windows system, in which case you press Ctrl-Z instead.


Comment on Re: Basic Input and Output
Replies are listed 'Best First'.
Re: Re: Basic Input and Output
by Anonymous Monk on Dec 15, 2001 at 02:59 UTC
    yes .... but when I added a line after the while like this:
    while(<>){ #reads lines until end of file or a Control-D print "$_"; #prints lines back out } print "done";
    why don't I see the 'done' after Ctrl-Z?
      I think this is *x system. The "Ctrl+Z" is mapped to the suspend signal (SIGTSTP). This suspends the execution of the program. You can restart the execution of the program by : fg %1 (if this is the first task to be suspended). Actually, "Ctrl+Z" does not bring you out of the while loop. On starting it again, you will still be inside the while loop. You will have to press "Ctrl+D" to come out of the loop.
Re: Re: Basic Input and Output
by Anonymous Monk on Nov 27, 2001 at 00:27 UTC
    ... or Ctrl + C or Ctrl + Break ...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2015-07-30 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls