Help for this page

Select Code to Download


  1. or download this
    use Data::Dumper;
    use constant MSG_DATA => { foo => 1 },
    ...
    for my $msg (MSG_DATA) {
        print Dumper $msg;
    }
    
  2. or download this
    use constant FOO => "xyz",
                 BAR => "def",
    ...
    
    # FOO returns qw/xyz BAR def BAZ abc/
    # BAR and BAZ aren't defined as constants
    
  3. or download this
    use constant { FOO => "xyz",
                   BAR => "def",
                   BAZ => "abc" };