/(\d+)/ and print $1; # or print $1 if /(\d+)/; # and print $numb if defined $numb; # since 0 is false