Help for this page

Select Code to Download


  1. or download this
    $ perl -le'print join " : ", split /(\|)/, "2|3|||||"'
    2 : | : 3 : | :  : | :  : | :  : | :  : |
    
  2. or download this
    $ perl -le'print join " : ", grep ++$i%2, split /(\|)/, "2|3|||||"'
    2 : 3 : : : :
    
  3. or download this
    $ perl -le'print(join(" : ", grep(++$i%2, split /(\|)/, "2|3|||||"), (
    +"")x(1-$i%2)))'
    2 : 3 : : : : :
    
  4. or download this
    $ perl -le'my @field = grep ++$i%2, split /(\|)/, "2|3|||||"; push @fi
    +eld, "" unless $i%2; print @field'
    2 : 3 : : : : :