Thank you for the fast reply.
I think there was a slight misunderstanding in my code. The code that I posted was after I had already made the switch to checking to see if LOOP or JMP was called, then running it. In that code, there is no $jmptaken global variable anymore, it was nixed in favor of an approach that (inefficiently) worked. I am aware that it is set by the value returned in the sub, and I'm happy for it, since it means that the control variable is controlling the loop.
I did not know about passing it to the sub and was actually looking for a way to pass variable byref instead of byval, so this will be tremendously useful, thank you.
However in this particular case, it won't be, since to use this technique for this, I would have the worst of both worlds: global variables, and reparsing already parsed input. Until I can get variable scope to work for me without reparsing, I may just stick with what I have.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.