- 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;
- or download this
use strict;
use Data::Dumper;
...
print Dumper(\%prices);
print Dumper(\@phone);
- or download this
$VAR1 = {
'dogs' => '$20',
...
'555-1212',
'0404-120021'
];