Help for this page

Select Code to Download


  1. or download this
    $foo = "spider9832man23";
    my @digits = ($foo =~ /\d/g);
    print scalar(@digits); # print 6
    
  2. or download this
    $foo = "spider9832man23";
    print ( $count = () = $foo =~ /\d/g); # prints: 6