$str = "fee=1 fie=2 foe=3 fum=4"; my %settings = $str =~ /\b(\w+)=(\S*)/g;