Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
        /^(.*)-(\d+)$/ and push @{ $hash{$1} }, $2
    }
    print STDERR "hash DUMPER:\n", Dumper(\%hash), "\n";
    
  2. or download this
    use v6;
    my @CELLS= 'A-1', 'A-2', 'A-3', 'A-4', 'B-5', 'B-6', 'C-7', 'C-8';
    ...
    %hash.push: @CELLS.map: *.split('-');
    
    say %hash.perl;
    
  3. or download this
    use v6;
    my @CELLS= 'A-1', 'A-2', 'A-3', 'A-4', 'B-5', 'B-6', 'C-7', 'C-8';
    ...
                     ;
    
    say %hash.perl;