Hey Monks,
I've got a puzzler. I moved an app from Windows to Linux (CentOS 8 to be specific) to solve library problems. I've got a section of code that tries to determine if an email should be sent. The code looks like this:
if ($out eq "D") { # not responding to pings if ($lastmailed{"$email|$targ"} <= ($min - $squelch)) { $mailer = psMailer->new(); $mailer->to($email); $mailer->from($emailfrom); $mailer->subject($emailsubject); $mailer->body("Asset $targ is not responding to pings."); $mailer->assetname($targ); $mailer->send(); } }
psMailer is a simple sendmail interface. That's not the problem. The $min var is calculated as int(time() / 60), so it should always be an int. The $squelch value comes from a settings file. If it is set to 10, the intent is that 10 minutes should pass between emails on a given topic.
This works in Windows, but in Linux the consistent result is that eleven minutes pass between the emails.
I don't get it. Do you have any ideas? TIA,
Lars
p.s. The perl version on CentOS 8 is 5.26.3. The version I was running in Windows was 5.28.1 (Activestate). I'm on Windows 7 x64.
In reply to Windows / Linux puzzler by lbrandewie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |