... A hash works best for comparing strings. This sub works on any amount of strings, but returns a false value for equal( 00 , 0 , 0 ). The warning allows

Message 4 of 5
, Apr 5, 2004

0 Attachment

Greg Matheson <lang@...> wrote:
:
: to make sure what was being returned was the boolean 1,
: rather than the value 1.
:
: I have a whole lot of these 3-way tests to run, so I think
: I will set up a hash like this
:
: $hash{ $x }++
: $hash{ $y }++
: $hash{ $z }++
:
: and see if grep( /^3$/, values @hash ) or grep( { $hash{$_}
: == 3 } keys @hash ) or something.

A hash works best for comparing strings. This sub works
on any amount of strings, but returns a false value for
equal( '00', 0 , 0 ). The warning allows values to be
undefined.