Help for this page

Select Code to Download


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