Help for this page

Select Code to Download


  1. or download this
      DB<260> pairwise { $a => $b } @a, @{[a..d]}  
     => (1, "a", 2, "b", 3, "c", 4, "d")
    
  2. or download this
      DB<261> my $a;pairwise { $a => $b } @a, @{[a..d]}      
    => (undef, "a", undef, "b", undef, "c", undef, "d")
    
  3. or download this
      DB<262> my $a; sort {$a <=>$b} reverse 1..10;;       
    Can't use "my $a" in sort comparison at (eval 360)[multi_perl5db.pl:64
    +4] line 2.
    
  4. or download this
    @a »+« @b;   # @a and @b MUST be the same size
    @a «+« @b;   # @a can be smaller, will upgrade
    @a »+» @b;   # @b can be smaller, will upgrade
    @a «+» @b;   # Either can be smaller, Perl will Do What You Mean