Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my @a1 = 'aaa' ~~ /./g;
    my @a2 = 'aaa' =~ /./g;
    say Data::Dumper->Dump([\@a1, \@a2], [qw/smart_match re_match/]);
    
  2. or download this
    $smart_match = [
                     1
    ...
                  'a',
                  'a'
                ];