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


in reply to Take digits from a string

See tr in Quote and Quote like Operators (it is quite a long way down the page so be patient :-).

$ perl -E ' > $str = q{nPqwe=2456fnraqe=13910feoption}; > ( $newStr = $str ) =~ tr{0-9}{}cd; > say $newStr;' 245613910 $

I hope this is helpful.

Cheers,

JohnGG