If the hyphen is in the middle of a character class, it defines a range. /[a-z]/ matches any lower case character. In the same way /[ -.]/ defines the range of ASCII characters between " " and "." and these are: !"#$%&'()*+,-.. If the hyphen is at the start of the class, it will be taken as a hyphen and not to define a range.
| [reply] [Watch: Dir/Any] [d/l] [select] |
Hyphen is used to match ranges like A-Z and 0-9. But sometimes you want to really match hyphen. In this case there are some fairly convoluted and difficult to remember rules specifying when hyphen means hyphen. An easy rule of thumb though is that if the hyphen is at the very beginning or very end of the range, it means hyphen.
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
| [reply] [Watch: Dir/Any] [d/l] [select] |
| [reply] [Watch: Dir/Any] |
You had used a long word "beginning" (instead of, say, "start"), yet you continue to use "u" instead of "you". Oh, find some punctuation signs & use them appropriately while there. | [reply] [Watch: Dir/Any] |