#!/usr/bin/perl my $dest = shift; my $cmd = "ping -c 1 $dest"; @output = `$cmd`; print "\n$cmd\n\n"; print "\n@output\n"; #### ping -c 1 139.130.4.5 PING 139.130.4.5 (139.130.4.5) 56(84) bytes of data. 64 bytes from 139.130.4.5: icmp_seq=1 ttl=42 time=187 ms --- 139.130.4.5 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 187ms rtt min/avg/max/mdev = 187.409/187.409/187.409/0.000 ms