Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Can't exit, except when I press ^C?

by Anonymous Monk
on Feb 02, 2012 at 15:13 UTC ( #951461=note: print w/ replies, xml ) Need Help??


in reply to Can't exit, except when I press ^C?

You've received two good answers here.

Your code reads a line of text. Then you test to see if the 1st character on that line is a <ctrl-W>.

Perhaps if you fixed the prompt?


Comment on Re: Can't exit, except when I press ^C?
Replies are listed 'Best First'.
Re^2: Can't exit, except when I press ^C?
by TalsiOrah (Initiate) on Feb 02, 2012 at 15:25 UTC
    Thanks, I was using octal and not hex. Is there a way to make it read input from outside the script so that I could press <esc> anytime and it would close? Sorry I know I'm like super noobie. Thanks though for your time ^_^
      As the other AM says, look at the Term namespace.

      I tried to find a core solution to you and found  getc, but it's even its documentation points you to the CPAN module Term::ReadKey.

      Looks like now is as good a time as any to learn how to use CPAN (or PPM).

        Okayy thanks! ^_^ I only really know the basics of creating a module and "use <module::function>".

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2015-07-08 00:41 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 (93 votes), past polls