Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Control C in PERL?

by AgentM (Curate)
on Apr 18, 2001 at 01:52 UTC ( #73363=note: print w/replies, xml ) Need Help??

in reply to Control C in PERL?

Control-C is a special keyboard character caught by the terminal drivers. It passes the SIGINT to the foreground process. While it's easy to ignore this single character sequence as shown above, it may be better to use Curses to ensure that you ignore ALL input while your loop is running. Also, Curses can help you to "beautify" your output. Also, you could assign ^C a subroutine or some instructions to notify the user that the key is being ignored. The C docs will help you more than the perldocs, so look at man curs_inopts(3X). Good luck!
AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

Replies are listed 'Best First'.
Re: Re: Control C in PERL?
by idnopheq (Chaplain) on Apr 18, 2001 at 06:54 UTC
    You can also use Term::ReadKey to help control the signals. This works better on Win32 systems for some reason.

    Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://73363]
[Corion]: Meh. I think I have now the parts down that I want from a simple Javascript frontend for single-page- applications with a aPerl backend. But it seems that all Javascript templating modules either don't support two-way binding (which would be nice) or ...
[Corion]: ... don't support server-side precompilation (which means the client has to compile all templates to Javascript themselves), or are giant frameworks that expect to do everything (which is not what I want)
[Corion]: I feel that there is a talk somewhere in there, either about the structure and parts, or how I used several parts to get a complete whole.
[Corion]: Maybe I can still find something that is compatible with handlebars.js (which has JS precompilation) but allows for two-way data binding (which is great for the UI)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-03-30 07:47 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (355 votes). Check out past polls.