my $branch_email_e = $FORM{r_Branch};
my $hostbranch_email_e = $FORM{r_Host_Branch};
my $branch\_email_f = $FORM\{r\_Direction_generale\};
my $hostbranch\_email_f = $FORM\{r\_Direction\_generale_daccueil\};
my $branch\_realname_e = '';
my $branch\_realname_f = '';
if \(\($branch\_email_e eq 'Dot.exp.rh-exp.staf.hr@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.rh-exp.staf.hr@.gc.ca'\)\) \{ $branch\_realname_e = 'Human Resources'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.fin-exp.staf.fin@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.fin-exp.staf.fin@.gc.ca'\)\) \{ $branch\_realname_e = 'Finance'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.min-exp.staf.min@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.min-exp.staf.min@.gc.ca'\)\) \{ $branch\_realname_e = 'Minister's Office'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.sm-exp.staf.dm@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.sm-exp.staf.dm@.gc.ca'\)\) \{ $branch\_realname_e = 'Deputy Minister's Office'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.bapgr-exp.staf.ocro@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.bapgr-exp.staf.ocro@.gc.ca'\)\) \{ $branch\_realname_e = 'Office of the Chief Risk Officer'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.dga-exp.staf.ab@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.dga-exp.staf.ab@.gc.ca'\)\) \{ $branch\_realname_e = 'Acquisitions'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.dgbi-exp.staf.rpb@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.dgbi-exp.staf.rpb@.gc.ca'\)\) \{ $branch\_realname_e = 'Real Property'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.dgcisp-exp.staf.cissb@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.dgcisp-exp.staf.cissb@.gc.ca'\)\) \{ $branch\_realname_e = 'Consulting, Information, and Shared Services'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.dgcgbr-exp.staf.abcb@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.dgcgbr-exp.staf.abcb@.gc.ca'\)\) \{ $branch\_realname_e = 'Accounting, Banking and Compensation'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.dgsmpc-exp.staf.cspcb@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.dgsmpc-exp.staf.cspcb@.gc.ca'\)\) \{ $branch\_realname_e = 'Corporate Services, Policy and Communications'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.dgsit-exp.staf.itsb@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.dgsit-exp.staf.itsb@.gc.ca'\)\) \{ $branch\_realname_e = 'Information Technology Services'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.dgve-exp.staf.aeb@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.dgve-exp.staf.aeb@.gc.ca'\)\) \{ $branch\_realname_e = 'Audit and Evaluation'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.bt-exp.staf.tb@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.bt-exp.staf.tb@.gc.ca'\)\) \{ $branch\_realname_e = 'Translation Bureau'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.atl-exp.staf.atl@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.atl-exp.staf.atl@.gc.ca'\)\) \{ $branch\_realname_e = 'Atlantic Region'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.que-exp.staf.que@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.que-exp.staf.que@.gc.ca'\)\) \{ $branch\_realname_e = 'Quebec Region'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.ont-exp.staf.ont@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.ont-exp.staf.ont@.gc.ca'\)\) \{ $branch\_realname_e = 'Ontario Region'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.oue-exp.staf.wes@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.oue-exp.staf.wes@.gc.ca'\)\) \{ $branch\_realname_e = 'Western Region'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.pac-exp.staf.pac@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.pac-exp.staf.pac@.gc.ca'\)\) \{ $branch\_realname_e = 'Pacific Region'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.boa-exp.staf.opo@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.boa-exp.staf.opo@.gc.ca'\)\) \{ $branch\_realname_e = 'Office of the Procurement Ombudsman'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.dgcp-exp.staf.ppb@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.dgcp-exp.staf.ppb@.gc.ca'\)\) \{ $branch\_realname_e = 'Parliamentary Precinct'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.mat-exp.staf.mat@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.mat-exp.staf.mat@.gc.ca'\)\) \{ $branch\_realname_e = 'Matane Site'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.she-exp.staf.she@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.she-exp.staf.she@.gc.ca'\)\) \{ $branch\_realname_e = 'Shediac Site'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
elsif \(\($branch\_email_e eq 'Dot.exp.surveillance-exp.staf.oversight@.gc.ca'\) or \($hostbranch\_email_e eq 'Dot.exp.surveillance-exp.staf.oversight@.gc.ca'\)\) \{ $branch\_realname_e = 'Departmental Oversight'; $FORM\{'branch\_in_emailsubject'\} = $branch\_realname_e; \}
---------- Post updated at 08:47 AM ---------- Previous update was at 08:46 AM ----------
would I use a loop or a case statement or something like that?