Help for this page
my @data = ( qq{key1~key2~key3 ... s/\n(.*)$//; %hash = ( %hash, map {$_, $1} split(/~/, $_)); }
my %hash = map { my @things = split(/~|\n/, $_); my $value = pop @things; map { $_, $value } @things; } @data;