Well this is what I would do
while(<FILE>){
$values{$1}=$2 if(/^(\w+)\s*=\s*(\w+)$/);
}
So this loops through the file matching :
- Start of line
- One or more words Remember this
- Zero or more spaces
- Equals sign
- Zero or more spaces
- One or more words Remember this
- End of line
And uses the two remembered words to create the hash
Diarmuid