zoryn has asked for the wisdom of the Perl Monks concerning the following question:

When using a signal handler subroutine, is it possible to call another subroutine from the one called by the signal handler? I can't seem to do it, I'm posting the relevant code here. "print_header" is the subroutine I'm trying to call, without success.
$SIG{INT} = 'aborted'; sub aborted { print_header; print "Aborted\n"; exit 1; }
EDIT: I'm sorry, the subroutine name was wrong...

Replies are listed 'Best First'.
Re: Signal handler question
by Joost (Canon) on Jul 25, 2007 at 12:14 UTC
      Solved. Well, it's before the subroutine declarations, obviously that's the problem. I don't know how I didn't think of that. Sorry about that, thanks.