I have the following subroutines:
sub my_sub {
my $coderef = shift;
$coderef->();
}
sub coderef {
my $a = shift;
my $b = shift;
print $a+$b;
}
and want to call my_sub(\coderef($a,$b))
in this manner i.e I want to provide the arguments of the code ref with it and run it on the my_sub function. Is it possible to do something like this in perl?