It takes an array ref of scalars not an array ref of a scalar with commas (and your single quotes are making it a literal string too: $DocumentReference). :) Try something like this. Note I adjusted it to match what I consider normal/idiomatic syntax-
if ( $document_reference ) { my @docs = split /\|/, $document_reference; if ( @docs > 1 ) { $where{DocumentRef} = { -in => \@docs }; } else { $where{DocumentRef} = $document_reference; } }
Untested. Have fun.
In reply to Re: difficulty with SQL::Abstract '-in' clauses
by Your Mother
in thread difficulty with SQL::Abstract '-in' clauses
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |