- or download this
use constant { FOO => 1, BAR => 2 };
- or download this
my @num_to_name = qw(FOO BAR);
- or download this
my $thing = FOO;
print "Thing = ".$num_to_name[$thing]."\n";
- or download this
my @num_to_name;
BEGIN {
...
*blah = sub { $number };
}
}