in reply to foreach returning to start of array

expanding on mrbbking's second example, you can build the hash as follows:
my @emails = qw( firstemailaddress@com secondemailaddress@com); my @requests = ( "first lot of info\n------------------------------------------\n", "second lot of info\n------------------------------------------\n" ); # build a hash, mapping email addresses to text my %address_to_text; @address_to_text{@emails} = @requests;
then use it as directed in his example.

~Particle ;Þ