Help for this page

Select Code to Download


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