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
In reply to Re: Logical Conundrum
by hardburn
in thread Logical Conundrum
by mcogan1966
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |