in reply to Snippet explanation please

EDIT: holli was faster.

It's the same as:

my $tempport; if ($args{DOUBLE_BYTE} =~ /y/i) { $tempport = DB_CATPORT; } else { $tempport = SB_CATPORT; }
See http://perldoc.perl.org/perlop.html#Conditional-Operator for details.