# this isn't really the assignment, but showing an example $listA[0] = ['1','foo','bar']; $listB[0] = ['1','bar','baz']; # these prints fine print 'First record from @listA: ' . (@{$listA[0]})[0] . "\n"; print 'First record from @listB: ' . (@{$listB[0]})[0] . "\n"; # We first want to get a list of records # in B that aren't in A my ( $a, $b ); @listToExpire = grep ( ($b = (@{$_})[0] && grep( ($a = (@{$_})[0] && $b != $a), @listA )), @listB );