- or download this
if( @ARGV ){
$SIG{INT} = \&exit_gracefully;
...
exit (2);
}
__END__
- or download this
C:\>perl \dev\loose\perlfunc.exit.pl
calling system
...
C:\>called Program interrupted ..
C:\>
- or download this
user@host:~$ perl perlfunc.exit.pl
calling system
...
user@host:~$
user@host:~$