William Kolln wrote: > > This is a previous message from April left unanswered..... > > Can Anyone Help...thanks if you can! > > I have an array called group_vals. > > This array can be populated by any combination of values > e.g. /sp|lp|ep12|ffp|vid|dvd|bx|bkk|cd|csd/ > > I want to be able to say that: > > if the array contains any combination of only the values 'cd' and/or 'csd' > then do x > otherwise > if the array contains any combination of any other value other than but also > including 'cd' and/or 'csd' > then do y
if ( @group_vals == grep /^cs?d$/, @group_vals ) { do { x() }; } else { do { y() }; } John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>