Oh wise ones, I humbly beseech you...
I have a subroutine that conatins many
unless statements (Seven to be exact), so with the left and right curly brackets for those and the ones for the begining and end of the sub that makes eight of each in total. They are all there, I have counted several times. : )
Despite the apparent matching of brackets, I still get the unmatched right curly bracket... error, on the line right at the end of the sub routine. I am running ActiveState Perl 5.61 on a win32 box, I have also tried it on a Linux box running the same version to the same result. What am I missing? Has anyone else experienced something similar?
I would post the offending sub routine but it is 200 odd lines long. It also contains a lot of HERE documents, as I have heard them called. For the
unless commands, I have not included
else {}, because I just want it to continue processing the sub. Perhaps this is my problem?
Would I be better off to reverse the logic and go with
if.... else{} statements instead?
Any suggestions / comments much appreciated. If you require more information, just ask, I should be sitting here for a while yet...
Much appreciated,
Gerard
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.