in reply to question about multi value hash key

You should declare %hash outside the while loop otherwise its not visible, when you print the results in the for loop. Time and conference should also be stored as value in hash record although the information is already available in the timeconference multivalued key. This makes later access easy. Try something like this.
use strict; use warnings; my %hash = (); my ($time, $conference, $type,$comment); while(<FILE>) { # adapt parsing values to your need here if (/conference=(.*)/){ $time = $1; } if (/conference=(.*)/){ $conference = $1; } if (/type=(.*)/){ $type = $1; } if (/comment=(.*)/){ $comment = $1; } if (/lastline of record/){ $hash{$time,$conference}{time} = $time; $hash{$time,$conference}{conference} = $conference; # info is a +lready in the key, for easy parsing in the for loop, store conference + twice. $hash{$time,$conference}{type} = $type; $hash{$time,$conference}{comment} = $comment; } } for my $timeconference (sort keys %hash) { printf "time %s, conference %s, type %s, comment %s\n", @{hash}{qw(time conference type comment)}; }

print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});