The return value is destined to be bound into a SQL statement, and a more natural set of true/false values simply doesn't work. In most cases, I would redflag a line such as that, but in this one weird case it actually makes sense.sub is_purple { ... return $color eq 'purple' ? '1' : '0'; }
-Blake
In reply to Re: DBI: when 1 != '1'
by blakem
in thread DBI: when 1 != '1'
by IlyaM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |