in reply to Can you tell what $$$\@ means?

It's a prototype. It's documented in perlsub under Prototypes. In this case, the prototype says that the function expects to get three scalars and a reference to an array.

See also:

Replies are listed 'Best First'.
Re^2: Can you tell what $$$\@ means?
by crusty_collins (Friar) on Apr 27, 2008 at 04:13 UTC
    Thanks for that. I guess now I will do some reading on prototypes.

      Read just enough to recognize them when you see em. Prototypes are one of the corners of Perl that tend to be left unused for the most part because they tend toward surprising behavior.


      Perl is environmentally friendly - it saves trees

        There seems to be a lot of negative commentary on function prototypes through the monastery archives. However, I haven't seen anything that looks like a definitive reason to consider them 'wrong', or a 'failed experiment'. Coming from a C++ background, I've used them religiously since I started coding Perl, and have always found them to work exactly as I expect them to (and as documented). Prototyping (along with use strict, of course) has kept me from having much weirder problems to diagnose than mismatched argument lists.

        I'll admit that Perl's function prototypes are kind of weird; but obviously, if you took all the weirdness out of Perl, it would be C, and what would be the fun of that?

        There seem to be examples of some problems with what I'd consider bizarre argument lists (particularly with function refs). I haven't ventured into doing such things. For 'normal' scalars, arrays, array refs, hash refs, etc. prototypes work just fine.

        Another thread of complaints was this node, but for some reason the author thought that declaring a sub as taking one scalar should accept a list anyway. Whatever. perl.com supposedly has an article that explains it all, but the link isn't working.

        Could I get an example of where a function prototype is clearly broken so bad that illustrates why they need to be avoided?

        /me is expecting to wind up demoted for daring to post a controversial opinion.

        sas