in reply to storing result in variable
my $output = `ping $host`; [download]
This is the simplest option and is probably OK for a command such as ping which will only take a short amount of time to run.