Help for this page

Select Code to Download


  1. or download this
    my $re = qr/beer=(\d{2}).*(?:vodka=(\d{2}))?.*chips=(\d{3})/;
    
  2. or download this
    #!/usr/bin/perl
    
    ...
            print "matched: @matched\n";
        }
    }
    
  3. or download this
    my @targets = qw/beer=(\d{2}) (vodka=(\d{2})) chips=(\d{3})/;
    
    ...
            print "matched: @matched\n";
        }
    }