Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by amarquis (Curate)
on May 01, 2008 at 13:27 UTC ( [id://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

Replies are listed 'Best First'.
Re^2: 2*pi*$r -- constant function without prototype
by Fletch (Bishop) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://683922]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-19 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found