$logger->info("performing ssh to the swicth"); my $ssh = Net::OpenSSH->new($ip,user=>"$username",password=>"$password",master_opts=>[-o =>"StrictHostKeyChecking=no"]); print"$display_message\n"; $logger->info("listing the current defined configuration of the switch using cfgshow"); my($out,$err) = $ssh->capture2("cfgshow"); #### 2015/07/25 23:01:48 Test1:pass cfgshow Defined configuration: cfg: FC_DVT MEZZI; MEZZI1 zone: MEZZI mezzi1; mezzi2; sanblaze zone: MEZZI1 mezzi3; mezzi4; sanblaze zone: vikash_enfield 10:00:00:00:c9:a1:95:aa; 10:00:00:00:c9:a1:95:ab; 20:00:00:11:0d:34:56:00 alias: mezzi1 10:00:00:00:c9:cd:cc:6c alias: mezzi2 10:00:00:00:c9:cd:cc:6d alias: mezzi3 10:00:00:90:fa:2e:dd:9f alias: mezzi4 10:00:00:90:fa:2e:dd:a0 alias: sanblaze 20:01:00:11:0d:34:57:00 Effective configuration: cfg: FC_DVT zone: MEZZI 10:00:00:00:c9:cd:cc:6c 10:00:00:00:c9:cd:cc:6d 20:01:00:11:0d:34:57:00 zone: MEZZI1 10:00:00:90:fa:2e:dd:9f 10:00:00:90:fa:2e:dd:a0 20:01:00:11:0d:34:57:00