in reply to Re: Re: Data structure for this...
in thread Data structure for this...

robinbowes,
my ($one, $two, $three) = qw(1 2 3); # works with warnings and stric +tures
You are of course correct about unpack returning the correct number of values. I am a novice in that regard, so I leave the style up to you.

Auto-vivication is the action by which a hash key that didn't previously exist gets created. This may or may not be intentional. Consider:

#!/usr/bin/perl -w use strict; my %hash; print "wow\n" if $hash{foo}{bar}; print $_, $/ for keys %hash;
Just by testing if the second level key 'bar' was true, 'foo' was automatically created. In the example code that I gave you, the hash keys were being auto-vivified intentionally in a hash slice. Sometimes it can be unintentional.

Cheers - L~R