while(){ next if /^\s*#?\s*$/; # skip blank lines (the hash mark lets you add comments) chomp; ($OS_Name,$count) = split /=/; $OS_Count{$OS_Name} = $count; }