in reply to Fetch numbers only

You're using parens where you should be using curlies. (And '_' doesn't need escaping.)
s/\w{6}_(\d{4})/$1/;
which is pretty much the same as the following
s/\w{6}_//;
The following should be faster, though:
$_ = substr($_, -4);