perl -wle '$_ = "345678"; print ":" . ( /./g )[ undef ]' #Use of uninitialized value in list slice at -e line 1. #:3