Help for this page

Select Code to Download


  1. or download this
    
    Example:
    ...
      if ($_ % 2 > 0) { DROP();} # <----- is what I would LOVE
                                 # to do
    }
    
  2. or download this
    Grep:
    @moo = grep {($_ % 2 > 0)?0:1;} @moo;
    ...
    for (my $i=0;$i<@moo;$i++)
    { if ($moo[$i] % 2 > 0)  {splice @moo, $i, 1;} }
    # wow is this slow