#!/usr/local/bin/perl -w use strict; sub foo { $_[0]->(); } sub bar { print "here: $_[0];\n"; } # invoke directly &bar("foo"); # invoke 'indirectly' # however, there's no way to pass in arguments to an # anonymouse subroutine? # (note: will die with use strict since @_ would # not have been initialized) # foo (sub { print "here: $_[0];\n"; }); # say, like this... foo (sub ("foo") { print "here: $_[0];\n"; }); # or, even (rather wicked)... # foo (sub { print "here: $_[0];\n"; }("foo")); # i know it looks absurd; however, shouldn't there # be a quicker way to make a do with anonymous subs # rather than using explicit sub declarations # when there's a need to also pass certain arguments # to the anonymous sub?