use strict; use warnings; use diagnostics; #### $a = 'name'; $b = 5; my $c = 'name'; my $d = 5; print "$a\[$b\]" eq "$c\[$d\]" ? "ok\n" : "booger\n";