my $pid = open (my $fh, "ssh $device rsync [..snip..] |") or &mail_die($!); my @output = <$fh>