$in =~ m/(?:(.)(?{print "ASCII value of '$1' is: ".ord($1)."\n"; $check += ord($1);}))*^/;