Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 scrutinizing the Monastery: (9)
As of 2016-06-30 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (396 votes). Check out past polls.