in reply to Getting Trouble with REGEXP

It finds a non-digit and replaces it with a space. If you want it to do it repeatedly, use /g.
$nums =~ s/\D/ /g;

See s/PATTERN/REPLACEMENT/... under "Regexp Quote-Like Operators" in perlop. ( er, the documentation of /g was moved to perlre in 5.10 )