if (! defined $count) { print "Undefined count.\n" } else { print substr("==========", $count) }