sub callback { my $coderef = shift; my @args = @_; sub { $coderef->(@args) } } sub short_but_wrong { sub { shift->(@_) } } sub foo { print "@_\n" } my $mine = callback( \&foo, 1, 2, 3 ); my $yours = short_but_wrong( \&foo, 1, 2, 3 ); print "Mine: "; $mine->(); print "Yours: "; $yours->();