Hi all,

can anyone tell me why the following code does not come out with 
'-123.45'.  It actually comes out with '123.45-'.

I think that it is because it's treating it as a number at some point, 
but I can't see when/why.

#!/usr/bin/perl -w
 
my $vat='123.45CR';
 
$vat=~s/(\.*)CR/-$1/i;
 
print "VAT='".$vat."'\n"; 
-- 
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 
    

Reply via email to