On Sat, Oct 14, 2000 at 07:03:35PM -0800, g3pb wrote: > is there a way other then using foreach to determie if an array contains a > particular value. in AppleScript it would be > > if list contains value then > -- do stuff > end if There's more than one way to do it. :) Here are two possibilities: if (grep $_ eq 'value', @list) { # do stuff } @hash{@list} = (); if (exists $hash{'value'}) { # do stuff } With the grep solution (as with foreach), you can do whatever test you want. The hash solution can only do eq, but is efficient if you're going to look things up in the hash many times. Ronald # ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org