Perl's magic open In general, 'magic' open is a bad idea. open FH, $file; Can be abused by supplying a filename containing pipes, such as /usr/bin/program | |/usr/bin/program open FH, "<$file"; Doesn't work if file contains leading or trailing spaces, such as ' myfile' or 'myfile '