use Quantum::Superpositions; my $a = my $b = my $c = 5; if ( all($a, $b, $c) == all( $a, $b, $c) ) { print "They are the same\n"; } else { print "They are not the same\n"; }