\w will match alphanumeric characters [0-9a-zA-Z_]. So in your regex \w matches digit also. So change it as shown.
Also you are missing a parantheses in second grouping.
$str = "abdbdr23"; ($name,$num) = ($str =~ /^([a-zA-Z]+)(\d{0,})$/) ; print "$name\t$num\n";
Prasad
In reply to Re: Simple regular expression problem
by prasadbabu
in thread Simple regular expression problem
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |