in reply to Logical Conundrum
my $lock = 1; $SIG{CONT} = sub { $lock = 0 }; while($lock) { sleep 1 } # Rest of your program
Then you send a CONT (continue) signal to the process when you want it to go. Probably not the best solution, as signal catching is considered a last-resort situation.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|