Just another Perl shrine | |
PerlMonks |
Re^5: single quotes not allowing in perlby tobyink (Canon) |
on May 24, 2013 at 13:51 UTC ( [id://1035141]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|