Regexp directives (like .) lose their special meaning inside character classes. You want
qr/^.{0,1000}$/s
or
qr/(?s:^.{0,1000}$)/
In character classes,
- A leading ^ will negate the character class.
- You can use Perl double-quote escapes (e.g. \x12, \cZ).
- $ and @ start variable interpolation (e.g. $var, @var, $var[4]).
- You can use Perl character classes (e.g. \d, \w, \s).
- You can use POSIX character classes (e.g. [:digit:], [:word:], [:space:])
- A dash can be used to create ranges (e.g. a-z).
- A slash (\) will cause the next character to be interpreted literally.
- Any other character (including ., * and +) will be matched literally.
Update: Added list.