$_ = "Happy Joy 002245:Dubloons 002256:hats 034523:paper clips 232344:pants 233394"; my $first_number = ( /(\d+)/ ); print "$first_number\n";