Having problems "uniquing" an array. Everything works except where I attempt to uniqe the output at very bottom of script. I've tried dozens of variations. fyi... can't use modules, can't use (cmd).
#!/usr/bin/perl
$id=id;
$pass=password;
$tsmsrv_cmd0="select volume_name,access from volumes";
$tsmsrv_cmd1="upd vol";
$tsmsrv_cmd2="q actlog begind=-8 endd=today msgno=1420";
foreach my $arg (@ARGV) { # Capturing command line Variables
$instance=$ARGV[0]; # This will be the TCPSERVERADDRESS
$node_namee=$ARGV[1]; # This will be the TCPPORT
}
open(LOGIN3, "dsmadmc -se=$instance -id=$id -pass=$pass -datao=yes -tabd $tsmsrv_cmd2|") || die "open: $!";
@get_restore_vol_list=<LOGIN3>;
close(LOGIN3);
foreach my $line (@get_restore_vol_list) {
@splitit = split (/ /, $line);
@get_restore_vol_list1 = "$splitit[7]\n";
chomp(@get_restore_vol_list1);
######################
%hash = map {$_, 1} @get_restore_vol_list1;
@unique = keys %hash;
print "@unique\n";
}
#!/usr/bin/perl
$id=id;
$pass=password;
$tsmsrv_cmd0="select volume_name,access from volumes";
$tsmsrv_cmd1="upd vol";
$tsmsrv_cmd2="q actlog begind=-8 endd=today msgno=1420";
foreach my $arg (@ARGV) { # Capturing command line Variables
$instance=$ARGV[0]; # This will be the TCPSERVERADDRESS
$node_namee=$ARGV[1]; # This will be the TCPPORT
}
open(LOGIN3, "dsmadmc -se=$instance -id=$id -pass=$pass -datao=yes -tabd $tsmsrv_cmd2|") || die "open: $!";
@get_restore_vol_list=<LOGIN3>;
close(LOGIN3);
foreach my $line (@get_restore_vol_list) {
@splitit = split (/ /, $line);
@get_restore_vol_list1 = "$splitit[7]\n";
chomp(@get_restore_vol_list1);
######################
%hash = map {$_, 1} @get_restore_vol_list1;
@unique = keys %hash;
print "@unique\n";
}