sub add_to { my $arg1 = $_[0]; return sub { add($arg1, $_[0]) }; } my $plus_5 = add_to(5); my $x = $plus_5->(3); # $x == 8