in reply to Variable fails where absolute path does not

\T in a double quoted string becomes just T (with a warning that the backslash is ignored).

It's also possible you have a trailing newline on your filename. Try:

use Data::Dumper; $Data::Dumper::Useqq=1; print Dumper($file);
to clearly see the contents of $file.