I have a series of variables, say, 
        $var0 $var1 $var2  $var3...  
up to lots and lots depending on user input.

They are also available as an array 
        @vars = (element1, element2,...)

I want to test to see if any two of their values are identical. Basically if the user 
has made an entry that is not unique he should get an error message.

I know how to compare any two of them of course

        if ($var1 == $var2)  { $youlose = "yes" }

but I don't want to do this over and over again. 
Is there a simple way to, say, compare multiple values to see if any two within the 
group match?

Thanks,
Tara

Reply via email to