It's a prototype. The $$
specifies that the help
function expects two arguments and that they should each be evaluated in scalar context. Note that this does not mean that they are scalar values! Perl's prototypes aren't like prototypes in other languages. They allow you to define functions that behave like built-in functions: parentheses are optional and context is imposed on the arguments.
sub f($$) { print "@_\n" }
my @a = ('a' .. 'c');
f(@a, 'd'); # prints "3 d"
I'm guessing that the error message you're seeing is
help() called too early to check prototype
which means that Perl saw a call to the function before it saw the declaration of the function and knew about the prototype. This means that the prototype wasn't enforced and the call may not behave as expected.
my @a = ('a' .. 'c');
f(@a, 'd'); # prints "a b c d"
sub f($$) { print "@_\n" }
To fix the error you need to either move the subroutine definition before the call, or add a declaration before the call.
sub f($$); # forward declaration
my @a = ('a' .. 'c');
f(@a, 'd'); # prints "3 d"
sub f($$) { print "@_\n" }
All of this should have absolutely nothing to do with your ability to upgrade to a newer version of Perl.