Works fine for me. Also, here is a handy table for this sort of thing: "Truth tests for different values" on True or False? A Quick Reference Guide. defined $file, however, would be true for an empty string.
edit: Oops, I didn't catch that there were quotes inside quotes...