in reply to Parse a file and store it in hash of hashes
Few Ideas, you data will look arranged in a better way if you use xml rather than plain file, with that you could parse your xml and store elements of xml as key and value of that element as value for your key. If you want to use only from a plain file you could split on basis of = sign and store them in hash look something like
Remember this is not complete code, it is just to give you hintwhile my $line (<$fh>){ my ($a, $b) = split (/=/, $line); $hash{$a} = $b ; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parse a file and store it in hash of hashes
by Sonali (Novice) on Jan 16, 2017 at 10:21 UTC |