in reply to using logical in if statement

You're not doing what I think you think you're doing. Err, umm...

You're testing whether any of the params are *true* or the last one matches a pipe, then error out. Instead you either want to put the matches after each param, or as I might do this:

elsif (grep { index($q->param($_), '|') >= 0 } qw/name site siteid/) { &error("Please make sure no fields have vertical bars, |"); }
Note the use of index rather than a regex. Just a personal preference for the type of match you wish to do.

Cheers,

- danboo