Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: How to check if a variable's value is equal to a member of a list of values

by cls33 (Novice)
on Mar 25, 2013 at 16:30 UTC ( #1025339=note: print w/replies, xml ) Need Help??


in reply to Re^4: How to check if a variable's value is equal to a member of a list of values
in thread How to check if a variable's value is equal to a member of a list of values

Hm... makes sense. But how do I handle it if I don't know the size/length of the array? Do I really have to check that and then programmatically build an array in a loop? Or is there a syntactical shortcut?
  • Comment on Re^5: How to check if a variable's value is equal to a member of a list of values

Replies are listed 'Best First'.
Re^6: How to check if a variable's value is equal to a member of a list of values
by choroba (Chancellor) on Mar 25, 2013 at 16:35 UTC
    I do not understand. In my examples, the size of the array is not hardcoded, it is dynamically computed from @array in the scalar context or $@array.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025339]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2016-12-03 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (55 votes). Check out past polls.