Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: 2*pi*$r -- constant function without prototype

by amarquis (Curate)
on May 01, 2008 at 13:27 UTC ( #683922=note: print w/ replies, xml ) Need Help??


in reply to 2*pi*$r -- constant function without prototype

Is there some meaning to unary * that I don't know about (and couldn't find in perlop) that makes this parse this way? Or do unprototyped functions just gobble up anything that vaguely looks like a term?

I tend to use parens zealously and have avoided learning about this kind of thing in the past, I guess it's time to head to the docs and read up.

Edit: Good point Fletch, totally forgot about that. Thanks!


Comment on Re: 2*pi*$r -- constant function without prototype
Re^2: 2*pi*$r -- constant function without prototype
by Fletch (Chancellor) on May 01, 2008 at 13:38 UTC

    Its the sigil for GLOBs (e.g. *STDOUT). How's the compiler supposed to know that $r didn't have a reference to a GLOB in it (somewhere else there was a my $r = \*STDOUT)?

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2014-08-28 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (255 votes), past polls