On Sat, Nov 17, 2001 at 09:13:04AM +0100, Philip Newton wrote:
> On Fri, 16 Nov 2001 23:02:57 -0500, in perl.fwp you wrote:
>
> > foreach my $num (0..255) {
> > my $chr = chr $num;
> > $U2P{$chr} = $chr =~ tr/\x20-\x7F// ? $chr : '\\'.sprintf("%03o",$num);
> > }
>
> That should be \x20-\x7E, I think. "\x7F" is a control character (DEL,
> "\c?").
It should really be:
$U2P{$chr} = isprint($chr) ? $chr : '\\'.sprintf("%03o",$num);
--
Michael G. Schwern <schwern@pobox.com> http://www.pobox.com/~schwern/
Perl Quality Assurance <perl-qa@perl.org> Kwalitee Is Job One
Death? Its like being on holiday with a group of Germans.
Thread Previous
|
Thread Next