Question : Problem: Nested loop

Hi I have been trying to create a nested loop which main purpose would be to use 2 files in parallel, the first file tmp4 contains IP Addresses that I would need to ssh to, now, every single line in file tmp4 should match with every single line of file tmp7 in such a way that when using ssh it should verify the path whether or not exists. and return to the machine from which I am running the command from with a result directory exists or directory does not exist.

I would appreciate your assistance.

Regards,

Michael

Answer : Problem: Nested loop

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
open(TMP4, ") {
    my $path=;
    unless($path) {
        warn "No path for ip $ip\n";
        next;
    }
    my $ssh = ssh('user@hostname', "cd $path");
    print "$ssh\n";
}
close(TMP4);
close(TMP7);
Open in New Window Select All
Random Solutions  
 
programming4us programming4us