note tye <p> Okay, here is one way to populate the hash: <code> #!/usr/bin/perl -w use strict; my %hash; while( <> ) { chomp $_; my @trib= grep { "" ne $_ } split /(...)/, $_; my $ref= \\%hash; while( @trib ) { $ref= \$$ref->{shift @trib}; } $$ref++; } </code><p> Note how I avoided having to save <code>shift @trib</code> to index into the next subhash by keeping a reference to the slot for the hash value instead of a reference to the hash. </p><p> If that code makes sense to you right away, then you are either sick, overlooking something, or do way too much work with Perl references. (: </p><p> P.S. I was seriously disappointed that <code> my @trib= split /(?<=\G...)/, $_; </code> doesn't work because <code>split</code> doesn't set <code>pos($_)</code> the way <code>/(?<=\G...)/g</code> would. </p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- <a href="/">tye</a> (but my friends call me "Tye") 35303 35303