my $type = event_hasher(\@event); sub event_hasher { my $cur_event = shift; my %event_hash; for my $item (@$cur_event) { $item =~ s/://g; my ($key,$value) = split / /, $item; $event_hash{$key} = $value; } return \%event_hash; } $queue_changes{$event_id} = $type;