in reply to Removing non digits
Then you will see that you really meant to code:
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. :)foreach my $num (@array) { $num =~ s/\D//g; print $num; }
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)
|
|---|