Anders Stegmann wrote:
Hi!
how do I assign a list to a hash entry like $hash{$key}[0].
I mean, something like this:
$hash{$key}[0] = @list;
must work.
Anders.
Close. Try:
use Data::Dumper;
$hash{$key} = [ @list ];
print Dumper( \%hash );
--
Just my 0.00000002 million dollars worth,
--- Shawn
"Probability is now one. Any problems that are left are your own."
SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is available at http://perldoc.perl.org/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>