- or download this
sub RemoveThing
{
...
# QueueAction serializes it's first argument
QueueAction($thingtodo);
}
- or download this
my @tasks = ();
{
...
push @tasks, sub {print "Doing task $x\n";};
}
foreach (@tasks) {$_->();}
- or download this
my @tasks = ();
my $x;
...
push @tasks, sub {print "Doing task $x\n";};
foreach (@tasks) {$_->();}