my %hash = map { my( $a, @b ) = split /\|/; defined $a ? ( $a => { @b } ) : () } split /\n+/, $content;