#!/usr/bin/perl while (<>) { next if /^;/; ($key, $val) = /(.*)=(.*)/; $config{$key} = $val; print "key: " . $key . " has val " . $val . "\n"; } print "Configuration: " . %config; print " {key} " . $config{"key"} . "\n";