blink has asked for the wisdom of the Perl Monks concerning the following question:
What I get is a match on:
..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 scratchpadif ( (exists $unapproved{$user}{$server}{'last_mail'}) && ($unapproved{$user}{$server}{'last_mail'} le $today +) )
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 +) )
$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 } },
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Testing for ge N && lt Y
by hv (Prior) on Feb 04, 2004 at 04:14 UTC |