in reply to Array of Hashes

tobeythorn:

Here's a simple example:

$ cat foo.pl use strict; use warnings; my @AoH; # Build the AoH while (<DATA>) { chomp; last if /^\s*$/; my ($file, $path) = split /:/; push @AoH, { path=>$path, file=>$file }; } # Print the data for (@AoH) { print "PATH:", $$_{path}, ", FILE:", $$_{file}, "\n"; } __DATA__ baz:/foo/bar gunk:/tmp/roboticus $ perl foo.pl PATH:/foo/bar, FILE:baz PATH:/tmp/roboticus, FILE:gunk

...roboticus

When your only tool is a hammer, all problems look like your thumb.