for (my $i=0; $i < $dirNum; $i++) { my $gftDirName = $ProdRec[$i]{'remoteDir'}; }