Is there any reason why this doesn't print the @missing?
Ive also tried unless ($myhash{$elem} == 1) { push(@missing, $frame) }
Any insight into what I'm doing wrong would be greatly appreciated.
Thanks!
-T
--------------------------------
CODE:
@missing = "";
@framelist= (1, 2, 3, 6, 10);
$startFrame= "001";
$endFrame = "0010";
@fullList = (int $startFrame .. int $endFrame);
print "FULL RANGE @fullList\n";
foreach $item(@fullList) {
$myhash{$item} = 1;
}
foreach $elem(@framelist) {
print "$elem\n";
if ($myhash{$elem} == 1) {
print "$elem found!\n";
}else{
push(@missing, $elem);
}
}
print "Missing Frames @missing"; ##Doesn't print this!
--------------------------------------------------------------
OUTPUT :
FULL RANGE 1 2 3 4 5 6 7 8 9 10
1
1 found!
2
2 found!
3
3 found!
6
6 found!
10
10 found!
Missing Frames