Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Ambiguous % parsing

by dave_the_m (Monsignor)
on Jul 21, 2015 at 10:15 UTC ( [id://1135555]=note: print w/replies, xml ) Need Help??


in reply to Ambiguous % parsing

Because method calls don't consume args without parentheses; this is a syntax error:
$obj->foo 1;
Sub calls only work without parentheses if the sub has been pre-declared (so the parser knows that 'foo' is a sub name):
foo 1; # syntax error sub foo {} foo 2; # ok

Dave.

Log In?
Username:
Password:

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

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

    No recent polls found