sub readSetup { open IN, "; close IN; foreach (@setupFile) { chomp; if (/^PROD/) { $Solution = $_; $Feature = 'none'; # Need to keep ordered list for viewing in UI push @Solutions, $Solution; } elsif ( $_ =~ /=/ ) { s/\s*=\s*/=/; ($property, $value) = split /=/, $_; $Installs{$Solution}{$Feature}{$property} = "$value"; } else { $Feature = "$_"; } } } sub print_it { for $Solution (@Solutions) { print "$Solution\n"; for $Feature ( keys %{ $Installs{$Solution} }) { $tab = "\t"; if ($Feature ne "none"){ print "$tab$Feature\n"; } else { $tab = "\t\t"; } for my $property ( keys %{ $Installs{$Solution}{$Feature} }) { print "$tab$property = $Installs{$Solution}{$Feature}{$property}\n"; } } print "\n"; } }