my $command = "host -v www.perlmonks.org 2>&1 |"; my $buff; if ( open( CMD, $command ) ) { while () { $buff .= "$_"; } close(CMD); } # do some parsing with $buff etc. # print $buff print "Output:\n$buff"; #### my $RC = system("host","-v","www.perlmonks.org"); $RC = $RC/256; print "RC:\n$RC";