Help for this page

Select Code to Download


  1. or download this
    my $str = 'The rabbits is $10 and the dogs are $20. The phone number i
    +s 555-1212.';
    
    ...
    my @capture = $str =~ /(rabbits|dogs|\d+-\d+)/g;
    
    print "$_\n" for @capture;
    
  2. or download this
    use strict;
    use Data::Dumper;
    ...
    
    print Dumper(\%prices);
    print Dumper(\@phone);
    
  3. or download this
    $VAR1 = {
              'dogs' => '$20',
    ...
              '555-1212',
              '0404-120021'
            ];