sub test { # return a closure to a routine which prints the creator's # first argument and the closure's first argument. my $val=$_[0]; sub { print "$val, $_[0]\n" } }