perl -e 'use forks; print system("ping -c1 localhost"),"\n$?\n";print $! if ($?==-1)'