tstock has asked for the wisdom of the Perl Monks concerning the following question:
Is there a way to initialize an anonymous hash with the slice syntax ? How would I edit the code below to skip using the %hash variable ? This is not important code wise, but not knowing how to do it is killing me.
Tiagomy %hash; @hash{ @labels } = @values; $data->{keys_and_values} = \%hash;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: anonymous hash slice
by eserte (Deacon) on May 18, 2004 at 17:35 UTC | |
Re: anonymous hash slice
by artist (Parson) on May 18, 2004 at 17:42 UTC | |
Re: anonymous hash slice
by BrowserUk (Patriarch) on May 18, 2004 at 20:29 UTC | |
Re: anonymous hash slice
by geekgrrl (Pilgrim) on May 18, 2004 at 19:04 UTC |
Back to
Seekers of Perl Wisdom