@arrray1 = ['a','b','c']; @array2 = ['a','b']; @array3 = ['a','b','c','d']; while(my($array1,$array2,$array3) = $iteration->()){ warn " iteration : $array1,$array2,$array3"; $sthgetCompany->execute($aray2) or die 'Cannot execute the statement'. $dbh_oracle->errstr;; #insertion to the database goes here. } # end of while loop #.