in reply to Timing out backquoted executions

You can use alarm.  For your purposes, I'm assuming the result would look like this:
use strict; use warnings; my $timeout = 3; eval { local $SIG{ALRM} = sub { die "alarm\n" }; alarm $timeout; `perl -e "while(1) { }"`; alarm 0; }; if ($@) { die "DID timeout after $timeout second(s)\n"; } print "never see this text\n";

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/