use Data::Dumper; use constant MSG_DATA => { foo => 1 }, { bar => 2 }, { baz => 3 }; for my $msg (MSG_DATA) { print Dumper $msg; }