Is this what you want? (Note the curly braces.)
my $x = { map { $_ + 1 => (qw/Jan Feb Mar Apr May/)[$_] } 0..4 }; print map { "$_ => $x->{$_}\n" } keys %$x;
In reply to Re: On-the-fly hashref
by hbm
in thread On-the-fly hashref
by oko1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |