- or download this
use Data::Dumper;
use constant MSG_DATA => { foo => 1 },
...
for my $msg (MSG_DATA) {
print Dumper $msg;
}
- 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
- or download this
use constant { FOO => "xyz",
BAR => "def",
BAZ => "abc" };