Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Consecutive if loops

by poj (Priest)
on Mar 18, 2013 at 16:51 UTC ( #1024109=note: print w/ replies, xml ) Need Help??


in reply to Consecutive if loops

I'm guessing the problem is when you enter yyyy the code runs in both the yyyy and the yyyy.mm blocks. Either add start ^ and end $ anchors to the regex statements

if ($start_input =~ /^\d\d\d\d$/ && $end_input =~ /^\d\d\d\d$/){

or swap the order so the if yyyy.mm is first then elseif yyyy

poj


Comment on Re: Consecutive if loops
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024109]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-12-25 23:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls