in reply to Removing non digits

Try this: use strict;

Then you will see that you really meant to code:

foreach my $num (@array) { $num =~ s/\D//g; print $num; }
Also, since \D is ANY non-digit, i removed the i modifier and replaced it with the g modifier so that you will remove more than just the first encountered non-digit. Further more, when using regular expressions, use the =~ operator and not the = operator. Hope this helps. :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)