Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: If statement seems to ignore elsif and skips to elseby AnomalousMonk (Archbishop) |
on Sep 25, 2017 at 23:19 UTC ( [id://1200076]=note: print w/replies, xml ) | Need Help?? |
I suspect your first or (at Ln 7) is NOT doing what you expect. You have two alternatives at Ln 8 & 9 (where you start another or clause. Suggest you group your alternatives.
I don't understand this point. Unless the OP was updated after your post and the update is not cited (in which case edgreenberg is in line to be officially Frowned Upon), all the
I also don't get the point about .. matching "two of anything (0 or more times ...)" and therefore possibly matching the "null" (by which I assume you mean empty) string. The only way I can see for the regex object you give in your example to match the empty string is if it is further quantified with some quantifier such as ? * {0} {0,} that allows zero matches. However, The only advantage I can see for the .{1}.{1} variation is that it makes dot-dot more visually prominent. Perhaps some testing is, indeed, called for. Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|