go ahead... be a heretic | |
PerlMonks |
Signal Handlingby anshumangoyal (Scribe) |
on May 13, 2012 at 07:11 UTC ( [id://970246]=perlquestion: print w/replies, xml ) | Need Help?? |
anshumangoyal has asked for the wisdom of the Perl Monks concerning the following question:
I want to handle INT Signal in My Perl Script. The Structure of script is that when a script is called it calls another Perl Package where most of the processing is done. I am using a little bit OOPS Concept where I am creating an object of another PM package. The Problem I am facing is I need to give some command line arguments to the Subroutine Handled by $SIG{'INT'} = 'Interrupt'. How can we do that? What I have done is declare $SIG{'INT') = 'Interrupt' while initializing the Object and then I call the Subroutines using that object. Now when ever an interrupt is received I want to close all file handles which are stored in $self.
Back to
Seekers of Perl Wisdom
|
|