my @items; foreach my $key (keys %hash){ push(@items,$key); }
Or simply:
my @items = keys %hash;
my $rxMatchItems; { local $" = q{|}; $rxMatchItems = qr{(?:@items)}; }
Or simply:
my $rxMatchItems = do { local $" = q{|}; qr{(?:@items)} };
Because your %hash is empty your pattern match becomes:
$ perl -le'my @items; my $rxMatchItems = do { local $" = q{|}; qr{(?:@ +items)} }; print $rxMatchItems' (?-xism:(?:))
And the pattern (?-xism:(?:)) will match everything.
In reply to Re: Large File Parsing
by jwkrahn
in thread Large File Parsing
by RobertCraven
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |