Think about Loose Coupling | |
PerlMonks |
Re: Inspect the members of a Posix Character Classby davido (Cardinal) |
on Jul 29, 2021 at 14:26 UTC ( [id://11135491]=note: print w/replies, xml ) | Need Help?? |
This isn't better than other solutions here, nor well golfed. It's just for fun. I did want to show what code led to this one liner, though, as it shows some of the tricks we can derive from CPAN:
This produces the same output as above. The only tricky part is that prop_invlist returns a list in the notation represented by [$a..$z), or in other words the start to one past the end. Consequently we need to pass $b-1 to expand_expr. Dave
In Section
Seekers of Perl Wisdom
|
|