my @big_strings = ( 'War and peace', 'The Lord of the rings', 'PI, to plenty of decimal places', ); my %keys = ( # give index into big_strings [a, b, c] => [1, 2], [b, d] => [0, 2], );