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.
In reply to Re^5: single quotes not allowing in perl
by hdb
in thread single quotes not allowing in perl
by vasanthgk91
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |