Help for this page

Select Code to Download


  1. or download this
    my @matches = '1 foo 22 bar 3' =~ /\d+/g;
    print "@matches";
    
  2. or download this
    1 22 3
    
  3. or download this
    while (my $match = '1 foo 22 bar 3' =~ /(\d+)/g) {
        print "$1 ";
    }
    
  4. or download this
    my @matches = '1 foo 22 bar 3' =~ /^\d+/g;
    print "@matches";