Log in



How to cancel out of waiting for in Perl?

Friday, November 19th, 2010 by

Question by m_simin: How to cancel out of waiting for in Perl?
On one line i have $ c = ;
I also have $ SIG{INT} = \&ctrlc; and later on
sub ctrlc { … }
How can i continue the script and skip the STDIN if Ctrl+C is hit?

Best answer:

Answer by martinthurn
You could try

$c = ;
CONT:
print “continued”;

sub ctrlc { goto CONT }

Know better? Leave your own answer in the comments!

Comments are closed.


Powered by Yahoo! Answers