##
$data{join "\0", $a, $b}
$data{join "\0", $a, $b, $c}
$data{join "\0", $d, $e}
##
##
for (keys %data) {
# you could do something with $data{$_} directly,
# or if you need access to the individual keys ...
my @keys = split /\0/;
# ...
}