if (foo()) { print "Everything is copacetic!\n"; } else { print "Error: $!\n"; }