sub is_eq { my ($l, $r) = @_; if (defined $l && defined $r) { return $l eq $r; } else { return !defined $l && !defined $r; } }
Updated: Fixed typo in transcription from Test::Builder::is_eq()
In reply to Re: undef-safe equality
by dragonchild
in thread undef-safe equality
by hubb0r
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |