in reply to Question about tr

Note that tr/// supports ranges, so this works too: tr|\0-9|A-Za-z|

(IIRC this might not work on systems that aren't ASCII based; perlebcdic)

Update: You said "the first 52 bytes of a character map", but \0-9 is the first 58 bytes. So maybe you want to do tr/\0-3/A-Za-z/? Or only the nonprintable characters with tr/\0-\x1F/A-Za-f/?

Update 2: WebPerl live demo of the following:

use warnings; use strict; print join(" "," ",map {sprintf "%X.",$_} 0..7), "\n"; for my $l (0..15) { printf ".%X", $l; for my $c ( map { chr( $l|($_<<4) ) } 0..7 ) { #$c =~ tr/\0-9/A-Za-z/; # doesn't work correctly! #$c =~ tr/\0-3/A-Za-z/; # option 1 $c =~ tr/\0-\x1F/A-Za-f/; # option 2 print " $c "; } print "\n"; } __END__ 0. 1. 2. 3. 4. 5. 6. 7. .0 A Q 0 @ P ` p .1 B R ! 1 A Q a q .2 C S " 2 B R b r .3 D T # 3 C S c s .4 E U $ 4 D T d t .5 F V % 5 E U e u .6 G W & 6 F V f v .7 H X ' 7 G W g w .8 I Y ( 8 H X h x .9 J Z ) 9 I Y i y .A K a * : J Z j z .B L b + ; K [ k { .C M c , < L \ l | .D N d - = M ] m } .E O e . > N ^ n ~ .F P f / ? O _ o