As long as the language supports constant, my policy is not to use constant directly later in the body of the program, and I always pre-define it in the "header":
use constant C1 => 14; use constant C2 => 9; my $a = 'x'; if ($a eq 'x') { $count = C1; } else { $count = C2; } print $count;
In reply to Re: Style: buried variables or double referencing?
by pg
in thread Style: buried variables or double referencing?
by punch_card_don
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |