in reply to Read file and remove whitespace

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

Diarmuid