in reply to Calling subroutine syntax

Prototyping is of less value than you would expect; It's been discussed, so searching on prototype will show the reasons.

Prototyping IS sometimes of value if you want a routine to act like a built-in, automatically referencing hashes or arrays to modify them, or declaring a routine to take no arguments. It is totally incompatible with objects, unfortunnately.

--
TTTATCGGTCGTTATATAGATGTTTGCA

Replies are listed 'Best First'.
Re: Re: Calling subroutine syntax
by crabbdean (Pilgrim) on May 01, 2004 at 23:25 UTC
    I had a quick read through the perldoc man page for it and was thinking similar things. My thoughts at the time were "I'll have to come back and have a thorough read through this because I'm not seeing a great use of it right now".

    Dean
    The Funkster of Mirth
    Programming these days takes more than a lone avenger with a compiler. - sam
    RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers
      As TomDLux alluded to above, the only real point is to simulate perl "builtins". For example a grep replacement would look like sub map2(&@) (as I recall) and let you do stuff like  map2 { foo bar } @baz