in reply to Fine tuning my condition statement

One way would be this:
next if $field =~ /^(first|second|third)$/;
The '^' matches the beginning of a string, and the '$' matches the end, emulating an 'eq' function for whatever's in between them. The '|'s are roughly equivalent to an 'or' statement: this will match 'first' or 'second' or 'third'.

Update: added explanation, and parens, thanks to Enlil.
--
Love justice; desire mercy.

Replies are listed 'Best First'.
Re: Re: Fine tuning my condition statement
by Anonymous Monk on Nov 20, 2002 at 20:25 UTC
    Thanks for everyones help and answers.