#!/usr/bin/perl use strict; use constant foo =>{ key1 => 'val1', key2 => 'val2' }; for my $i ( foo ) { for my $j (keys %{$i} ) { print "$j - $i->{$j}\n"; } }
In reply to Re: Dereference a hash constant
by bichonfrise74
in thread Dereference a hash constant
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |