in reply to Re: hash question
in thread hash question

Here's the same thing, but with a single regular expression pattern...

while (<DATA>) { next unless m{ ^ ( aixFsMountPoint | aixFsSize | aixFsFree ) # $1 \. ( \d+ ) # $2 \s* = \s* ( .* ) # $3 }ix; $data{$1}{$2} = $3; }

But there are plenty of excellent config file (INI file) modules on CPAN for doing this work.

Also, beware the use of the i modifier to match case-insensitively tokens you're then going to use as the keys of a hash.

aixFsMountPoint ≠ aixfsmountpoint ≠ AIXFSMOUNTPOINT