- or download this
my %new2 =
hmap { $_[1]{nick} =~ /rbush|fred/
...
: ()
} %$h;
- or download this
bash-3.2$ perl hmap_good2.pl
syntax error at hmap_good2.pl line 39, near "] =>"
syntax error at hmap_good2.pl line 40, near ":"
Execution of hmap_good2.pl aborted due to compilation errors.
- or download this
use Data::Dumper;
...
} %$h;
print Dumper ($new2), "\n";
- or download this
my $new2 =
hmap { $_[1]{nick} =~ /rbush|fred/
? ($_[0] => hmap { $_[0], $_[1] } $_[1])
: ()
} $h;