[comp.lang.perl] tr/y not deleting chars?

tad@prism.gatech.EDU (Tad K. Mannes) (03/08/91)

I have the following simple script which does not do what I expect it
to do.... I want `$pre' to contain the prefix (`TEST') and `$num' to
contain the numeric portion (`012').   The output follows the script.
Am I doing something wrong or is there really something wrong with
`tr'?  I've gotten around the problem using the `s' command so I don't
need help with that....				--Tad

----------------------------Heres the Script--------------------------
#!/hydra2/tad/bin/hydra/perl
printf("%s\n",$]);
$test = "TEST012";
($pre = $test) =~ y/0-9//d;
($num = $test) =~ y/A-Z//d;
printf("prefix=%s        number=%s\n",$pre,$num);
----------------------------Heres the Output--------------------------
$Header: perly.c,v 3.0.1.10 91/01/11 18:22:48 lwall Locked $
Patch level: 44

prefix=TEST012        number=TEST012