foreach $val(@array){ here I need to create an array with the name of $val like the below @$val = connection to database($val) which returns an array }