in reply to getting a number from a string

If you just need to grab the first numeric substring from the total string, this will do it:
$_ = "Happy Joy 002245:Dubloons 002256:hats 034523:paper clips 232344: +pants 233394"; my $first_number = ( /(\d+)/ ); print "$first_number\n";
If you need to get each of the numeric substrings, make it an array assignment and add the "g" modifier to the regex:
my @numbers = ( /(\d+)/g ); print join $/, @numbers, "";
And, the next time you say "I've tried ....", show us the actual code that you tried, so we can see why you couldn't get it to work. That makes it more educational.