$line =~ s/\$\{\S+\}/\l$1/g; # not sure if escaping the {'s is necessary.