in reply to Using references to subroutines

In addition to the comments made above, if you look at your code, you should hopefully see that if it did compile you aren't doing anything because you never dereference the subroutine reference. So the routine never gets called. Consider a slightly different version:
use strict; my $testsub = sub { print $_[0]; }; &{$testsub}("hi");
Here you can see that testsub becomes a reference to an anonymous subroutine. I then call it by dereferencing it and passing it a parameter to print. I could have used shift instead but wanted it to be a bit clearer for this example.

HTH

SP