0

I have been browsing a few of the perl modules where they have used $$%, $$, $$$, @, $%, @.. and so on in the function arguments.

I understand that $$ in the argument ensures that you have to pass 2 non-optional parameters and $ for 1 non-optional parameter. Do the others have similar meaning as well?

mpe
  • 1,000
  • 1
  • 8
  • 25
satishkumar432
  • 337
  • 1
  • 6
  • 19

1 Answers1

11

These are function prototypes. Everything you need to know about prototypes is in perlsub.

Before you read it a second time, read all of the answers in Why are Perl 5's function prototypes bad? and Far More Than Everything You've Ever Wanted to Know about Prototypes in Perl and see if it disabuses you of the notion to use prototypes.

Community
  • 1
  • 1
mob
  • 117,087
  • 18
  • 149
  • 283
  • 1
    @user2189668: What you should take away from this is a decision to avoid subroutine prototypes in your own code – Borodin Sep 10 '15 at 01:24