I\'m quite new to Perl and I\'m trying to build a hash recursively and getting nowhere. I tried searching for tutorials to dynamically build hashes, but all I could find wer
Data::Diver covers this niche so well that people shouldn't reinvent the wheel.
use strict;
use warnings;
use Data::Diver 'DiveVal';
use Data::Dumper;
my $root = {};
while ( my $line = ) {
chomp($line);
DiveVal( $root, split m!/!, $line ) = '';
}
print Dumper $root;
__DATA__
one/two/three
four
five/six/seven/eight