in reply to if/elsif statement troubles

Zaxo's answer above is spot on. On a slightly different take, you may wish to use a hash to make your code a little clearer:

# pick a better name -- I don't know what the data represents my %srhash = ( SRADDL => "SRC Addlf", SRSUPP => "SRC Supp", # and so on ); $ora = $srhash{$dtype} || $dtype;
HTH

Replies are listed 'Best First'.
Re: if/elsif statement troubles
by Abigail-II (Bishop) on May 09, 2003 at 21:54 UTC
    Slightly better:
    $ora = exists $srhash {$dtype} ? $srhash {$dtype} : $dtype;

    just in case "0", "" or undef is one of the possibilities.

    Abigail