Rubinow, Larry wrote:
> Cleaner and easier would be
>
> if( grep {/^$code$/} qw(APM CHN CN MN N NP NPR NRN NS
> PMD RNR SCI) )
I think you want /^\Q$code\E$/, or else A.M will work, or probably also
\w+ .
Cheers,
Philip
___
Perl-Win32-Users
cc: "Paul G.
Weiss" <[EMAIL PROTECTED]>, "'byron wise'"
eState.com <[EMAIL PROTECTED]>,
[EMAIL PROTECTED]
On Wed, 29 Nov 2000, byron wise wrote:
> I want to check the var $code against the following abbreviations, and if
> one of them matches I'll execute the if statment. The code follows:
>
> if ($code eq ('APM' or 'CHN' or 'CN' or 'MN' or 'N' or 'NP' or 'NPR' or
> 'NRN' or 'NS' or 'PMD' or 'RNR'