in reply to funky $_ with map {}

Why not change the anonymous sub to call a function that will return an anonymous sub?
#!/usr/bin/perl my @answers = map { return_tag ($_,'H1') } 1..5; foreach my $answer (@answers){ print $answer->(),"\n"; } sub return_tag { my ($arg,$tag) = @_; # Will be caught in closure. return sub { "<$tag>".$arg."</$tag>" }; }


-Lee

"To be civilized is to deny one's nature."