in reply to subs as args

What you are doing are references to a sub. Here are some examples of refs and anonymous subs.
use strict; #this is variable holding a ref to an anon sub my $mysub1 = sub { print "mysub1 called\n" }; #this is a regular subroutine sub mysub2 { print "mysub2 called\n"; } #call this with a refrerence to an array sub references sub take_subs { my @arrayofsubs= @{$_[0]}; print "take_subs called, now calling each subref\n"; foreach (@arrayofsubs) { &$_; } } # call take_subs with each type take_subs ([ $mysub1, # variable holding anon sub reference \&mysub2, # sub reference sub { print "anonymous sub called\n" } #anon sub ]); __OUTPUT__ take_subs called, now calling each subref mysub1 called mysub2 called anonymous sub called

--

flounder