Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stdin break

Status
Not open for further replies.

eatr

Technical User
Jan 20, 2006
48
trivial question unless you don't know the code

I need to read in a sequence of typed in numbers to an array

simple enough @arry=<stdin>;

so

i type in 1 number HIT RETURN
type in another number hit return, etc
(or just type in numbers with spaces, or whatever)

how do I break out of the STDIN sequence, for example by typing 'EXIT', or whatever; i.e. let the program know I'm done typing?

^C doesn't get it done
 
and look for Term::ReadKey

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
You might also be able to get away with ^d (ctrl+d) on a unix box, or ^z (ctrl+z) on a windows box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top