#!/usr/bin/perl -w $hostname = `hostname`; if ($!) { print "found error of: $!\n"; } else { print $hostname }