Loading ...
Sorry, an error occurred while loading the content.

Use of dollar signs before subroutine definition

Expand Messages
  • Kelly Jones
    I saw something like this in a mimedefang tutorial: sub foo ($$$$) {return 1;} By trial and error, I discovered this means: foo takes EXACTLY four arguments,
    Message 1 of 3 , Oct 24, 2008
    • 0 Attachment
      I saw something like this in a mimedefang tutorial:

      sub foo ($$$$) {return 1;}

      By trial and error, I discovered this means: foo takes EXACTLY four
      arguments, no less, no more.

      Where can I learn more about this syntax/feature?

      --
      We're just a Bunch Of Regular Guys, a collective group that's trying
      to understand and assimilate technology. We feel that resistance to
      new ideas and technology is unwise and ultimately futile.
    • Jeff Pinyan
      On Fri, Oct 24, 2008 at 10:07 PM, Kelly Jones ... This is called function prototyping and can be found in the *perlsub*(Perl subroutine) documentation on
      Message 2 of 3 , Oct 24, 2008
      • 0 Attachment
        On Fri, Oct 24, 2008 at 10:07 PM, Kelly Jones
        <kelly.terry.jones@...>wrote:

        > I saw something like this in a mimedefang tutorial:
        >
        > sub foo ($$$$) {return 1;}
        >
        > By trial and error, I discovered this means: foo takes EXACTLY four
        > arguments, no less, no more.
        >
        > Where can I learn more about this syntax/feature?
        >

        This is called "function prototyping" and can be found in the
        *perlsub*(Perl subroutine) documentation on your system, accessible
        via the command:

        *perldoc perlsub*

        Prototyping is rarely *necessary* and you can get by without it.

        --
        [Mary said,] "Do whatever he tells you." ~ John 2:5
        The Cross Reference - http://thecrossreference.blogspot.com/
        Nos autem praedicamus Christum crucifixum (1 Cor 1:23)


        [Non-text portions of this message have been removed]
      • Urban Gabor
        Hi, it is called function (subroutine) prototyping. If you need I will dig up some more info for you. Contact me privately. Gabaux Linux is like a wigwam: no
        Message 3 of 3 , Oct 30, 2008
        • 0 Attachment
          Hi,

          it is called function (subroutine) prototyping. If you need I will dig up some more info for you. Contact me privately.

          Gabaux
          Linux is like a wigwam: no gates, no windows, and an apache inside!

          Kelly Jones <kelly.terry.jones@...> �rta:


          > I saw something like this in a mimedefang tutorial:
          >
          > sub foo ($$$$) {return 1;}
          >
          > By trial and error, I discovered this means: foo takes EXACTLY four
          > arguments, no less, no more.
          >
          > Where can I learn more about this syntax/feature?
          >
          > --
          > We're just a Bunch Of Regular Guys, a collective group that's trying
          > to understand and assimilate technology. We feel that resistance to
          > new ideas and technology is unwise and ultimately futile.
          >
          >
          >

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.