Not sure if you consider it more elegant, but you could:
my @where = (@array[0]); push @where, 'OR', {x => $_} for @array[1..$#array];
In reply to Re: Elegant way to turn array of values into SQL "where" clause
by GrandFather
in thread Elegant way to turn array of values into SQL "where" clause
by ajkessel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |