Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
So you populate @array with an integer value pulled from the database. Then you have this snippet:
if (grep !$_ => @array) {...}
There's a good chance that this snippet has a bug. If all values are true, then there's no problem. However, what if a value is undefined? To the database, that means "I don't know what this value is." It does not mean "this value is false," so your logic may be suspect. With the latest versions of Perl, we're going to see strange things like this:
if (grep ! ($_
// 1) => @array) {...}
I think my head will melt.
Write what you mean (Score:2)
If you just want to weed out empty strings and zeroes, but want to keep NULLs, do so explicitly:
Re:Write what you mean (Score:2)
Yes, explicitly stating what you want is much cleaner. Still, it would be interesting to create a three-value logic mode in Perl, one where you can know that "undefined" is not false, nor is it greater or less than 13.6 (for example).