M
Matt Garrish
Just curious if anyone has a more elegant way to check whether multiple
values are equal. For example, given:
$a = $b = $c = $d = $e = 'test';
is there anything better than:
if ( ($a eq $b) && ($b eq $c) && ($c eq $d) && ($d eq $e) ) { ... }
It would be nice (cleaner) if you could simply test if $a eq $b eq $c eq $d,
but that obviously won't work.
Matt
values are equal. For example, given:
$a = $b = $c = $d = $e = 'test';
is there anything better than:
if ( ($a eq $b) && ($b eq $c) && ($c eq $d) && ($d eq $e) ) { ... }
It would be nice (cleaner) if you could simply test if $a eq $b eq $c eq $d,
but that obviously won't work.
Matt