Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    my %hashslice2 = map { /^TYPE/ ? ($_,$hash{$_}) : () } keys %hash;
    print Dumper(\%hashslice2);
    
  2. or download this
    use strict;
    use warnings;
    ...
    my %hashslice2;
    @hashslice2{@keys} = @hash{@keys};
    print Dumper(\%hashslice2);