foreach (@members_name) { if (/^${accountnumber}_/) { to_sub($zip, $accountnumber, $_ ); } }