#!/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>" }; }
In reply to Re: funky $_ with map {}
by shotgunefx
in thread funky $_ with map {}
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |