This is a prototype . $$ indicates that the help function expects two arguments, and each of them should be evaluated in a scalar context. Please note that this does not mean that they are scalar values! Perl prototypes are not like prototypes in other languages. They allow you to define functions that behave as built-in functions: brackets are optional, and the context is superimposed on the arguments.
sub f($$) { print "@_\n" } my @a = ('a' .. 'c'); f(@a, 'd');
I assume the error message you see is
help() called too early to check prototype
which means that Perl saw the function call before he saw the function declaration and knew about the prototype. This means that the prototype has not been applied, and the call may not behave as expected.
my @a = ('a' .. 'c'); f(@a, 'd');
To fix the error, you need to either move the subroutine definition before the call, or add an announcement before the call.
sub f($$);
All this should have absolutely nothing to do with your ability to upgrade to a newer version of Perl.
source share