- or download this
my @items;
foreach my $key (keys %hash){
push(@items,$key);
}
- or download this
my @items = keys %hash;
- or download this
my $rxMatchItems;
{ local $" = q{|};
$rxMatchItems = qr{(?:@items)};
}
- or download this
my $rxMatchItems = do { local $" = q{|}; qr{(?:@items)} };
- or download this
$ perl -le'my @items; my $rxMatchItems = do { local $" = q{|}; qr{(?:@
+items)} }; print $rxMatchItems'
(?-xism:(?:))