if ($data =~ /^([\d\w]+)/ ) { notate('A', length($1)); } #### if ($data =~ /^[A-Za-z0-9]+/ ) { notate('A', $+[0]); }