in reply to One-liner to join keys on a two-dimensionnal hash ?
use strict; use warnings; my %replaces = ( "foo" => { 'W100' => 'W102', 'W101' => 'W103', }, "bar" => { 'W120' => 'W99', 'W121' => 'W104', }, ); my $expr = join '|', map {keys %$_} values %replaces; print $expr;
(similar to ikegami's but DRYer)
There are multiple issues with your code:
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) kind of, strict doesn't complain.
|
|---|