http://www.perlmonks.org?node_id=60461


in reply to Spaced Out

Thanks for this excellent and illuminating meditation.

OTOH, I feel there's no need to call for the perl porters to include this little wishlet into their big task list. It's trivial to work around this problem (once you know it exists, admitted - that's something for the HTML::Parser docs, or maybe the Perl FAQ). And it even looks more readable:

use HTML::Entities; my $html = ' '; my $text = HTML::Entities::decode_entities($html); print "\$text = '$text'\n"; my $whitespace = "[\s\240]"; if ($text =~ /^$whitespace$/) { print "yes\n"; } else { print "no\n"; }

Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com