How about...
SWITCH: { $ora = "SRC Addlf", last SWITCH if ($dtype =~ /^SRADDL$/); $ora = "SRC Supp", last SWITCH if ($dtype =~ /^SRSUPP$/); $ora = "SRC Group", last SWITCH if ($dtype =~ /^GROUP$/); $ora = "SRC Dep", last SWITCH if ($dtype =~ /^SRFXDC$/); $ora = "SRC Med", last SWITCH if ($dtype =~ /^SRFLMD$/); $ora = "SRC Life", last SWITCH if ($dtype =~ /^SRLIFE$/); $ora = $dtype; } print "$dtype : $ora \n";
Cē
In reply to Re: if/elsif statement troubles
by cciulla
in thread if/elsif statement troubles
by landonc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |