in reply to Numbers only in a string
while(<SOME_INPUT>){ $digits_only .= (join '', split /\D+/) . $/ } [download]