$SIG{INT} = sub { die "borked on $$ptr"; }; alarm(1); while(1) { my $var = "wibble"; $ptr = \$var; } alarm(0);