Consider, for the heck of it, this:
use constant TWO => 2;
$x = TWO;
print "$x ${\TWO}\n";
Then someone comes along and changes the constant...
use constant TWO => qw( one three );
$x = TWO;
print "$x ${\TWO}\n";
Oops. So, if you are going to do that defensively you should be a little more explicit...
use constant TWO => qw( one three );
$x = TWO;
print "$x ${\scalar TWO}\n";
Sure, anyone who goes around changing constants should expect fire and brimstone to rain down on him... but it still happens. :-)
-sauoq
"My two cents aren't worth a dime.";
|