use constant C1 => 14; use constant C2 => 9; my $a = 'x'; if ($a eq 'x') { $count = C1; } else { $count = C2; } print $count;