When using /e in the
search operator the right side must be a valid perl syntax, in this case perl interpreter gives you a syntax error when evaluating /cygdrive/lc($1), you have quote the strings and concatenate it with the lc call, like:
$path=~s#^(\w):\\#"/cygdrive/".lc($1)."/"#e;