Sure, you can use a substitution:
s/\D//g; # global
or you can use a special transliteration:
tr/0-9//cd; # complement, delete
A more elaborate description is found in the perlop document.
I must here point out that s/// and tr/// are two totally different operators! As said, they're documented in perlop.
Other documents you might want to read are the perlre* documents. All perldocs are listed in the document "perl" (perldoc perl).