my $str = 'abcdefgha'; print $str =~ m/\A\w+a/ ? "MATCHED\n" : "NO MATCH\n"; print $str =~ m/\A\w++a/ ? "MATCHED\n" : "NO MATCH\n";