in reply to if/elsif statement troubles
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ē
|
|---|