Here's a shorter version (compared to the others I saw posted):
sub iseq { return defined($_[0]) == defined($_[1]) && $_[0] eq $_[1]; }
Update: Drat. You can't get away with that shortcut and still avoid the warning.
- tye
In reply to Re: undef-safe equality (shorter)
by tye
in thread undef-safe equality
by hubb0r
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |