"I love the smell of sarcasm in the morning. Smells like..." No wait, wrong Apocalypse.
You can't optimize away function calls, since they're referenced, and so, clearly are present in some other place. That would be silly, but then, I'm sure that was the point.
Remember that the condition was that
duped_ids would be called on those lines that had
> 1 number of entries, and it would appear that you are calling it here on the first.
Also, call me crazy, but I despise labels. They're just not right. Maybe if you're programming in assembler, sure, you need labels, but in Perl? You can almost always avoid using them.
my $found;
foreach (@file)
{
if (/^\Q$storeline|\E/ && $found++) # First hit skipped
{
duped_ids($storeline);
return;
}
}
unless ($found)
{
no_match($storeline);
return;
}
As they say in English: "Voila!"
Now I'll admit I have a sneaking suspicion that somewhere else in the code there is some nonsense like
foreach (@codes) { foo($_) } but I can't say for sure.
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.