Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re[6]: How's your Perl?

by xmath (Hermit)
on Oct 28, 2003 at 18:27 UTC ( #302748=note: print w/replies, xml ) Need Help??


in reply to Re: Re[4]: How's your Perl?
in thread How's your Perl?

ok, here's why:

initially at parse time a goto-expression is free of special cases, so goto &foo is just a goto-element with the ENTERSUB expression &foo as argument. Now, the "goto SUB" variation needs a subref ofcourse, and to accomplish this perl effectively puts a \ in front of the argument, turning goto &foo into goto \&foo. Now here comes the problem: it does this whenever the argument is an ENTERSUB, and forgets to check for the ampersand (!(o->op_flags & OPf_STACKED)), so goto +foo becomes goto \foo, which results in the strange error message (the +-prefix is already dropped at parse time, and is just to prevent the special-case handling for goto LABEL to be triggered)

Questions? :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://302748]
help
Chatterbox?
[Discipulus]: echo 'a'\'' gives me the prompt and then go with error on ctrl-d
[Discipulus]: uch! worst than windows!
[marto]: It's not worse, just different. Different shells, different tools. Different ways

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-11-24 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (346 votes). Check out past polls.

    Notices?