my $tmpCounter = 0; for(@testDateRows){ if($tmpCounter > 1){ exit; } @tmpArr = split(',',$_); $formattedName = $tmpArr[0]; #iterate through all the tickers for(@algTickers){ $strTickerName = $_; #there is an open call in here that works, I commented it out to see if I could still reproduce the problem # open... print "$strTName:$formattedName\n"; #now we need to load the a file $strAlg = ''; open(ALGFILE,"/A/sub/$strTName") or die "can't open the asub file: $strTName : $!\n"; while(){ $strAlg .= $_; } close(ALGFILE) or die "can't close the asub file: $strTName :$!\n"; } $tmpCounter++; }