in reply to hashes recursively

You don't say what different treatment should be applied inside and outside the info block, so I'll have to skip that for now.

Here is a recursive solution for an arbitrary depth of hash.

my %hash=(); Define( \%hash, split /\s*\=\s*/ ) for (split /\n/, $scalar); sub Define { # value returned not used above, # but can be useful for some other cases my $href = shift; my $key = shift or return $href; defined ( $href -> { $key } ) or $href -> { $key } = {}; my $value = shift or return $href -> { $key }; @_ and return Define( $href -> { $key }, $value, @_ ); return $href -> { $key } = $value; }

-M

Free your mind