#!/usr/bin/perl -w
sub make_closure{
my $param = shift;
my $double = $param * 2;
return sub{
my $param = shift;
my $ret = $double * $param;
return $ret;
}
}
$sub = make_closure(10);
for $tmp (1..10){
$val = &$sub($tmp);
print "$val\n";
}