$ perl -e '$x=0; $ print "failed\n" unless defined $x and length($x)' $