$ perl -Mstrict -Mwarnings -e 'my $PATH = q{not_a_file}; open fh $PATH' Can't locate object method "fh" via package "not_a_file" (perhaps you forgot to load "not_a_file"?) at -e line 1.