As pointed out above, you are passing (the address off) an abritrary lump of string data to the OS kernel and asking it to call this as a function when your process receives a signal. Needless to say, when the OS tries to execute the machine code located at that location, the text "&catch" doesn't translate well into x86 machine code.
Even if you correctly pass the address of your catch subroutine to the OS, it still isn't going to work. The code pointed at by &catch is perl bytecode, not x86 machinecode.
In reply to Re: SetConsoleCtrlHandler Script
by BrowserUk
in thread SetConsoleCtrlHandler Script
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |