Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Regarding the conditional part of eslif (or if) statement

by Erez (Curate)
on Sep 12, 2010 at 16:23 UTC ( #859871=note: print w/ replies, xml ) Need Help??


in reply to Re: Regarding the conditional part of eslif (or if) statement
in thread Regarding the conditional part of eslif (or if) statement

I will write with several elsif statements one for each value of the array

Surely you're missing something here, why not run a foreach on the array and in that test the values, or try another thing? What you describe sounds so very un-programmatic, that I suggest reviewing the logic flow of the program at that point, and see how it could be generalised into a loop.

"Principle of Least Astonishment: Any language that doesn’t occasionally surprise the novice will pay for it by continually surprising the expert..


Comment on Re^2: Regarding the conditional part of eslif (or if) statement

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (15)
As of 2014-04-24 11:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (565 votes), past polls