in reply to Dereference a hash constant
#!/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"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dereference a hash constant
by Anonymous Monk on Oct 22, 2009 at 00:38 UTC |