in reply to How to count number of multiple logical conditions used in if,elseif or while in perl

This is so unreadable, please take a look at Markup in the Monastery , Perl Monks Approved HTML tags, and then, right beneath the text box where you wrote your question you have clear instructions there to remind you of what you're required to do..

Click on the link to your question once again and you'd be able to re-edit..this way you would guarantee that a response (not an angry one of course) is garnered to your questions

  • Comment on Re: How to count number of multiple logical conditions used in if,elseif or while in perl

Replies are listed 'Best First'.
Re^2: How to count number of multiple logical conditions used in if,elseif or while in perl
by loki (Novice) on Dec 22, 2009 at 06:23 UTC

    sorry i have corrected it ... i am a first time user..

      I updated my code below based on your updated and much better formatted requirements. Thanks for doing that!

      You should be aware that something like this [\&&\||] doesn't do what I think you think it does! This is a character set with "& and |". double && can't be specified that way.

      The main problem I see is an overly complex looping and program structure. My code to deal with the "while" has one loop statement (a for loop), one regex and one print. Your code goes 4 levels deep with complex if statements. I did put an extra "for" to skip lines in case "(" wasn't on the same line as the "while", but that is just gravy.

      Glad to help you. Is this some sort of homework assignment? It is ok with me if it is, but I'd like to know that.