Help for this page

Select Code to Download


  1. or download this
    $ perl -MO=Deparse -e 'my @b = @{ reduce { push @$a, $b if !@$a || $b 
    +ne $a->[-1]; $a } [], @a };'
    syntax error at -e line 1, near "$b if"
    -e had compilation errors.
    
  2. or download this
    $ perl -MO=Deparse -e 'my @b = @{ +reduce { push @$a, $b if !@$a || $b
    + ne $a->[-1]; $a } [], @a };'
    my(@b) = @{do {
    ...
        $a
    }->reduce([], @a);};
    -e syntax OK