I have been looking at some Perl code that has some subroutine declarations that make no sense to me. They appear as:
foo($$$$;$);
foo(\$\$\$);
What do the symbols ";" and "\" do or mean in these declarations?
I have been looking at some Perl code that has some subroutine declarations that make no sense to me. They appear as:
foo($$$$;$);
foo(\$\$\$);
What do the symbols ";" and "\" do or mean in these declarations?
They're "prototypes" - but Perl prototypes aren't like those in other languages, and probably shouldn't be used.
The $
denotes a scalar argument to the function. ;$
denotes an optional additional scalar argument. And \$
denotes a reference argument.