in reply to Explanation requested regarding negation of characters classes in perlretut

Maybe a picture will help. Try running this on a screen that is at least 108 chars wide.

#! perl -slw use strict; for my $re ( qw[ .* \d \D [^\d] [^\D] \w \W [^\w] [^\W] [\d\w] [^\d\w] [\D\W] [^\D\W] ] ) { printf "%8s:'%s'\n\n", $re, join '', map{ /$re/ ? $_ : ' ' } map{ chr } 32 .. 126; };;

Normally I'd post the output, but the OSU PM wrap feature doesn't like it.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
  • Comment on Re: Explanation requested regarding negation of characters classes in perlretut
  • Download Code