use 5.010; use strict; my $a = ['a', 'A']; my $b = ['b', $a, 'B']; push @$a, $b; say "hurrah!" if 'x' ~~ $a;