my $tempport; # declare var if( $args{DOUBLE_BYTE} =~ /y/i ) # try to match with a regex # regex is just looking for 'y' # the /i means case-insensitive { $tempport = DB_CATPORT; # Set to DB_CATPORT } else { $tempport = SB_CATPORT; # Set to SB_CATPORT }