Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
              'today',
              'world'
            ];
    
  2. or download this
    my @new_array;
    while (my ($key, $value) = each %hash) {
    ...
              '2',
              '1'
            ];
    
  3. or download this
    my @new_array_sorted = sort @new_array;
    
    ...
              '1',
              '2'
            ];
    
  4. or download this
    my @new_array;
    while (my ($key, $value) = each %hash) {
    ...
              '2',
              '1'
            ];
    
  5. or download this
    my @new_array;
    while (my ($key, $value) = each %hash) {
    ...
              '2',
              '1'
            ];
    
  6. or download this
    no if $] >= 5.018, "experimental::smartmatch"; #disable warnings
    while (my ($key, $value) = each %hash) {
    ...
              '2',
              '1'
            ];
    
  7. or download this
    #!/usr/bin/perl
    use strict;
    ...
    smartmatch 109170306/s        43%         --       -42%       -49%
    grep       187969925/s       145%        72%         --       -13%
    map        215053763/s       181%        97%        14%         --