http://www.perlmonks.org?node_id=226636


in reply to Strip non-numeric

Try this  $var =~ s/\D//g; This (untested) code will remove all non-numeric characters from the string.

Josh
Update: I fixed my type where I left the g off the regexp. Sorry
Update:2 I also fixed the /// problem that tall_man pointed out. Thanks.