Hi Paul,
On Thursday 01 Aug 2002 4:21 pm, Paul Johnson wrote:
> On Thu, Aug 01, 2002 at 04:08:29PM +0100, Gary Stainburn wrote:
> > 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__
>
> Seems fine to me. Would you care to elaborate, and post an example
> where you would expect the output to be "C"?
That was an instance where it should have returned a 'C'. The problem was, as
pointed out by Shishir, the text inside the regex was wrong.
--
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]