in reply to Trapping for Control^Z

What a coinky-dink - JSchmitz asked this in the CB not more than a day ago. If you're looking to trap the Ctrl-z which suspends a process then you need to trap the TSTP signal e.g
shell> perl -e '$SIG{TSTP} = sub { warn "suspension trapped\n" }; \ sleep 50; print "on with the show ...\n"' __output__ suspension trapped on with the show ...
That of course assumes Ctrl-z was pressed within those 50 sleeping seconds. Also note that this interrupts the current operation, in this case the sleep (at least on my linux system). Check out man 7 signal for more info on signals.
HTH

_________
broquaint