Ok, I have been up for practically 3 days straight and I am sure that I have just over looked something. Here is an overly simplistic example of my problem. I am getting file information and sticking it into an array. I then need to check those times against 3 different types of alerts. The outter for loop goes through 3 times and the inner foreach loop goes through one time. There are never any changes to my @array, and yet the result changes every time through - what the heck am I missing???
#!/usr/bin/perl -w
use strict;
my @msgtime = (1029435628);
my $i;
for ( $i = 0; $i <= 2; $i++ ) {
foreach my $timealert (@msgtime) {
$timealert = ((time - $timealert) / 60);
print "$timealert\n";
}
}