in reply to can't replace a directory with a variable
If you insist in your HTML attributes being delimeted by double quotes, use
$OLEControl->{Document}->write(qq(<html><body><img src = "$file" /></b +ody></html>)); [download]