If it really bothers you that much, you could do...
use constant YES => 1; use constant NO => 0; # ... my $answer = is_contact_female ? YES : NO;
... but it's shamefully redundant if is_contact_female is already returning a true or false; not to mention limiting (ie, you couldn't use 1 to represent 'Yes, and adult', 2 to be 'Yes, but teen', etc.).
--k.
In reply to Re: Question Marks in Subroutine Names
by Kanji
in thread Question Marks in Subroutine Names
by dug
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |