when i try from the cmdline
Yes, that's the definite way to decide such nagging questions.
For the q{a} x 20 . q{!} =~ m/^\w{6,20}$/ being true: This is a consequence of Perl's operator precedence. (See perldoc perlop.) Actually the return value of that command is a string of 20 'a'-s, since the dot in there has the lowest precedence. To the left of the dot we have 'a'x20 to which an empty string (the result of '!' not matching your regexp) is appended.
In reply to Re: another question on a string of 20 letters
by pKai
in thread another question on a string of 20 letters
by keiusui
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |