in reply to parse string into multidimensional hash

How is your existing code failing?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit
  • Comment on Re: parse string into multidimensional hash

Replies are listed 'Best First'.
Re^2: parse string into multidimensional hash
by chickenman (Novice) on Feb 20, 2018 at 08:37 UTC
    At the Moment i am doing the following
    But i have no clue how to break on Database: or Properties:
    $output =~ s/Configuration Status:\n/Configuration Status:/g; my @output = split /\n/, $output; for (@output) { $_ =~ s/\s//g; #print "$_\n"; my ($attr, $val) = split /[=,:,-]/, $_; $dg_config{$attr} = $val; }