for my $id (keys %proc_data) { my $location = $proc_data{$id}[0]; my $filename = $proc_data{$id}[1]; # file processing code here }