Your solution allows for a trailing newline. Try it with this string:
$_ = "abcdefghijklm\n\n";
You can fix that up with the \z anchor :)
In reply to Re^2: how should i test whether a string contains between 6 and 20 letters and numbers
by brian_d_foy
in thread how should i test whether a string contains between 6 and 20 letters and numbers
by keiusui
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |