Likeless has asked for the wisdom of the Perl Monks concerning the following question:
I have a piece of code that looks a bit like this (slightly simplified for pasting purposes):
print STDERR "1:$orderid:$remainingamount > $requestedamount\n"; if ($remainingamount > $requestedamount) { bbcart::report_error(message => "$orderid:Amount approved by serve +r is more than the requested amount. So exiting."); die "Amount approved by server is more than the requested amount." +; }
Sometimes this code seems to trigger and report the error when the amounts are the same. I have received error reports like this:
12345:Amount approved by server is more than the requested amount. So exiting.When I go to the error, log, it says this:
1:12345:2008 > 2008But this doesn't always happen, just some of the time.
I am completely at a loss as to how to debug this. Can you think of any possible avenues of investigation? There is nowhere else in the code that outputs this error message. The variables are being printed with identical values immediately before the > comparison claims they are different.
What might possibly cause this?
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
The code is running under mod_perl in 1.x Apache.
|
|---|