Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
A great way of figuring how Perl parses a particular piece of code is to use the B::Deparse module. That will attempt (usually successfully) to deparse your code and make its meaning more clear. To run it against a program, you would do something like this:
The output will be Deparse's interpretation of what the code really does. Usually, the result is not too far off of what you have. In this case, I ran Deparse against you snippet and the result surprised me. Not in what it was saying to do, but in how it said it. In any event, it was much more clear. This should help you in the future -- I hope:
So, as you can see, that parsed completely differently from your expectations. Hope this helps. Cheers, Join the Perlmonks Setiathome Group or just click on the the link and check out our stats. In reply to Re: @_ still mystifies me
by Ovid
|
|