Help for this page

Select Code to Download


  1. or download this
    $WHERE = join ' OR ', map { X => $_ }, @ARRAY;
    $DB->update(
       { table => 'table',
         fields => { Y => 0 },
         where => $WHERE
       } );
    
  2. or download this
    my @ARRAY=qw/foo bar baz/;
    my @WHERE=('OR') x (2*@ARRAY - 1);
    for (0 .. $#ARRAY) {
      $WHERE[2*$_] = { X => $ARRAY[$_] };
    }