in reply to Re: Why is my array getting changed?
in thread Why is my array getting changed?
Yep, what jmcnamara said! *Smiles*
Add the following line to your code and run it...
#!/usr/bin/perl -w use strict; my @msgtime = (1029435628); my $i; for ( $i = 0; $i <= 2; $i++ ) { foreach my $timealert (@msgtime) { print '[',$timealert,'][',@msgtime,']',"\n"; # <--- Add me! $timealert = ((time - $timealert) / 60); print "$timealert\n"; } }
|
---|
In Section
Seekers of Perl Wisdom