Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Catching INT in Term::ReadLine::Gnu->readline()

by hippo (Chancellor)
on Jul 03, 2019 at 11:00 UTC ( #11102344=note: print w/replies, xml ) Need Help??


in reply to Catching INT in Term::ReadLine::Gnu->readline()

Your code as supplied works for me in that it produces the output which I believe you were expecting:

$ perl cctrap.pl Term::ReadLine::Stub try CTRL-C in some text here :abcd^C caught CODE(0x194e9a0)INT xyz $

The input sequence is: abcd^Cxyz<RETURN>

This runs with perl v5.20.3 and Term::ReadLine 1.14 from bash on Linux. Maybe you just need to avoid Term::ReadLine::Gnu?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2020-02-17 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (71 votes). Check out past polls.

    Notices?