in reply to Getting Trouble with REGEXP

Use the global modifier 'g':
$nums =~ s/\D/ /g;

Search for 'modifier' in perlop.