Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: A question of style

by maverick (Curate)
on Aug 23, 2000 at 03:02 UTC ( #29129=note: print w/ replies, xml ) Need Help??


in reply to A question of style

I tend to use parens and & on my functions. I think it makes it easier on whoever has to read my code next. The parens remove any perceived ambiguity(sp?) about function params and the & clearly seperates which functions I've written from any built in ones.

IIRC there was some difference about using the & in Perl 4, something to do with the order in which perl tried to find the code for it, or something. (perhaps merlyn will clear this part up).

/\/\averick


Comment on Re: A question of style
RE: Re: A question of style
by merlyn (Sage) on Aug 23, 2000 at 09:39 UTC
    ampersand was always required in Perl4. Perl5 made it optional, as long as you either have the subroutine declaration in scope or parens following the name.

    -- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://29129]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (1)
As of 2014-11-29 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (204 votes), past polls