Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 having an uproarious good time at the Monastery: (5)
As of 2015-07-30 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls