Maybe I've been staring at this a bit too long, but I don't see my problem. Based upon the contents of %unapproved, I expect $action = "do nothing";

What I get is a match on:

if ( (exists $unapproved{$user}{$server}{'last_mail'}) && ($unapproved{$user}{$server}{'last_mail'} le $today +) )
..which I'm unable to explain. A snippet of %unapproved is below. If you feel that you need to see the rest of the code, it's on my scratchpad
sub processMail { my $first_email_text = "first notification"; my $second_email_text = "second notification"; my $last_email_text = "final notification"; my ($year, $month, $day) = Today(); #my $today = "$year" . "$month" . "$day"; my ($year2, $month2, $day2) = Add_Delta_Days($year, $month, $day, +14); #my $second = "$year2" . "$month2" . "$day2"; my ($year3, $month3, $day3) = Add_Delta_Days($year, $month, $day, +31); #my $last = "$year3" . "$month3" . "$day3"; my $today = 9; my $second = 15; my $last = 31; my %warn; my $unapprvd_conf = new Config::General( -ConfigFile => "$unapproved_file", -ExtendedAccess => 1, -InterPolateVars => 1 ); my %unapproved = $unapprvd_conf->getall(); #print Dumper(\%unapproved); exit; foreach my $user (keys %unapproved) { if (exists $option{v} ) { print "USER: $user\n==============\n"; + } foreach my $server (keys %{$unapproved{$user}}) { my $action; if ( (exists $unapproved{$user}{$server}{'last_mail'}) && ($unapproved{$user}{$server}{'last_mail'} le $today +) ) { print "$user on $server last mail = $unapproved{$user} +{$server}{'last_mail'}\n"; $warn{$user}{$server} = $last_email_text; $action = "send final email\, delete account"; } if ( (exists $unapproved{$user}{$server}{'sec_mail'}) && ($unapproved{$user}{$server}{'sec_mail'} le $today) && ($unapproved{$user}{$server}{'last_mail'} gt $today +) )

Contents of %unapproved

$VAR1 = { 'hramgr' => { 'waredev1' => { 'first_mail' => 9, 'sec_mail' => 15, 'lastLogin' => 'Last login Tue + Aug 27 15:54:50 2002 (505 days ago)', 'last_mail' => 31 } },

In reply to Testing for ge N && lt Y by blink

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.