# Build Host to Storage relationship and enter into database my %remove_dups; foreach my $host(keys %{$build_dwh{'h2s'}}) { my ($storID,$lcstorage,$lcalias); foreach my $keys(keys %{$build_dwh{'h2s'}{$host}}) { foreach my $arrayID (@{$build_dwh{'h2s'}{$host}{$keys}}) { my $lchost = lc($host); my $lcstor = lc($arrayID); my $cmpOne = $rtrn_prdb_id{'storage'}{$lcstor}; my $cmpTwo = $rtrn_prdb_id{'serial'}{$lcstor}; my $storID = ($cmpOne ? $cmpOne : $cmpTwo); if($storID) { my $htcref = join(".",$rtrn_prdb_id{'host'}{$lchost},$storID); if(!$rtrn_prdb_id{'hTSId'}{$htcref}) { push @{$remove_dups{$storID}}, $rtrn_prdb_id{'host'}{$lchost}; # push @h2s, [$rtrn_prdb_id{'host'}{$lchost},$storID]; } } } } } #processH2sLoad(@h2s); my %rebuild_h2s; foreach my $storArr(%remove_dups) { my %seen =() ; my @unique_array = grep { ! $seen{$_}++ } @{$remove_dups{$storArr}}; $rebuild_h2s{$storArr} = \@unique_array; } foreach my $storArr(%rebuild_h2s) { my @shift_load = @{$rebuild_h2s{$storArr}}; #<--- Error Here for(my $i = 0; $i <=$#shift_load; $i++) { push @h2s, [$shift_load[$i],$storArr]; } } #### Can't use an undefined value as an ARRAY reference at TEMP_load_OCI_HostData_Complete.pl line 393. #### $VAR1 = 'ARRAY(0xdf95524)'; #<--- Can't get rid of this shouldn't be here $VAR2 = []; $VAR3 = '102'; $VAR4 = [ '10045475', '10045476', '10045477', '10045478', '10045479', '10045480', '10045482', '10045481', '10045483', '10045484', '10045485', '10045486', '10045487', '10045488', '10045489', '10045490', '10045492', '10045491', '10045494', '10045493', '10045496', '10045495' ]