in reply to How do I keep a subroutine from running on a refresh?

What is your application? Perl-TK?

We need a few more details to be helpful, otherwise we're just guessing.

Without a crystal ball, we may end up telling you the equivalent of

use Firearm; my $pistol = Firearm->new; $pistol->magazine->load; $pistol->chamber(round); $pistol->unlock(); my $foot = [x=>0, y=>0, z=>-1]; $pistol->aim($foot); $pistol->fire(); $pistol->lock();
...or worse :)

-QM
--
Quantum Mechanics: The dreams stuff is made of