Help for this page

Select Code to Download


  1. or download this
    my @numbers = (2);  =>  my @numbers = 2;
    my @other = (2);    =>  my @other = 2;
    @numbers ~~ (2)     =>  @numbers ~~ 2
    my @empty = ();     =>  my @empty;
    
  2. or download this
    >perl -E"@a = qw(a b); say @a ~~ 2 ? 'match' : 'no match'"
    no match
    
    >perl -E"@a = qw(a b); say @a ~~ (0+\@a) ? 'match' : 'no match'"
    match
    
  3. or download this
    >perl -E"@a = qw(a b); say \@a ~~ \@a ? 'match' : 'no match'"
    match
    
  4. or download this
    >perl -E"@a = qw(a b); @b = qw(a b); say \@a ~~ \@b ? 'match' : 'no ma
    +tch'"
    match