in reply to read flat file and build tree-like structure
use Data::Diver qw( DiveVal ); my %hash; while (<>) { chomp; my ($key, $val) = split(/=/, $_, 2); my @keys = split(/\./, $key); DiveVal(\%hash, map \$_, @keys) = $val; } [download]