Well...you are checking for REVERSE whereas you should check either for REVERS or REVERSAL
-----Original Message----- From: Gary Stainburn [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 11:08 AM To: [EMAIL PROTECTED] Subject: condition problem Hi all, I've got the following code segment, which doesn't work. Regardless of the contents of $fields{'terms1'} $fields{'invcr'} always contains 'I', as shown below. As far as I can see, the condition looks correct. __BEGIN__ $fields{'terms1'}=&tstr(&gettext(7,38,50)); print STDERR "terms1='$fields{terms1}'\n"; $fields{'invcr'}=($fields{'terms1'}=~/REVERSE/) ? 'C' : 'I'; print STDERR "invcr='$fields{invcr}'\n"; __END__ __BEGIN__ terms1='***** INVOICE REVERSAL *****' invcr='I' __END__ -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]