sub fetch_cmd { my ($cmd) = @_; my $ret; unless ( open FH, $cmd . ' 2>&1 |' ) { return; } while () { $ret .= $_; } close FH; return $ret; }