my %proc_data = ( ID1 => [qw{location1 filename1}], ID2 => [qw{location2 filename2}], ... ); #### for my $id (keys %proc_data) { my $location = $proc_data{$id}[0]; my $filename = $proc_data{$id}[1]; # file processing code here } #### use strict; use warnings; #### use diagnostics;