in reply to Re^2: 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
Seems like I'm on the right track, but this is a more elegant implementation. I was not previously familiar with the ability to suck an entire array into a hash using the @hash{@array}=() syntax.
One quick syntactical question... using this method, how would I set each hash key to a defined static value? Using something like:
@hash{@array}='MyValue';
Only seems to set the value for the first key...
One quick syntactical question... using this method, how would I set each hash key to a defined static value? Using something like:
@hash{@array}='MyValue';
Only seems to set the value for the first key...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: How to check if a variable's value is equal to a member of a list of values
by LanX (Saint) on Mar 25, 2013 at 15:36 UTC | |
Re^4: How to check if a variable's value is equal to a member of a list of values
by choroba (Cardinal) on Mar 25, 2013 at 15:37 UTC | |
by cls33 (Novice) on Mar 25, 2013 at 16:30 UTC | |
by choroba (Cardinal) on Mar 25, 2013 at 16:35 UTC |
In Section
Seekers of Perl Wisdom