On Aug 7, Trina Espinoza said: >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.
I'd like to know what you're trying to do... I think you're using the wrong array somewhere. >@missing = ""; That should be @missing = (); No need to store an empty string in the array. >@framelist= (1, 2, 3, 6, 10); >$startFrame= "001"; >$endFrame = "0010"; > >@fullList = (int $startFrame .. int $endFrame); >print "FULL RANGE @fullList\n"; So this is: 1 2 3 4 5 6 7 8 9 10. >foreach $item(@fullList) { > $myhash{$item} = 1; >} See, here I think you meant to use @framelist, not @fullList. Because by using @fullList, you've set all the numbers 1 through 10 as keys in the hash. Perhaps you wanted to use @framelist here... >foreach $elem(@framelist) { ... and @fullList here? > print "$elem\n"; > if ($myhash{$elem} == 1) { > print "$elem found!\n"; > }else{ > push(@missing, $elem); > } >} What would you have expected to be in @missing? -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]