"be consistent" | |
PerlMonks |
Re: Argument problem when using a perl scriptby halfcountplus (Hermit) |
on Apr 12, 2016 at 14:11 UTC ( [id://1160225]=note: print w/replies, xml ) | Need Help?? |
I'm not familiar with `Monitoring::Plugin` but I presume if you don't use the -k argument, then this:
Returns an empty string. In that case you just need to add another condition.
This is an atypical use of `if` (with the clauses reversed) but it works; it's the same as:
Anyway, now `$where` will be empty if `$condition` is. I don't know if the blank space between `CONNECTOR.$table` and `$where` will then adversely affect your query; if so you need to put that space into the `if` block instead:
Notice the space before the "WHERE".
In Section
Seekers of Perl Wisdom
|
|