Search code examples
perlchangelog

When did the file mode in Perl's open become a separate argument?


Once upon a time, you opened files in Perl like so:

open(FH, ">$filename");

At some point, for many good reasons including some very sticky ones involving filenames with leading spaces, this syntax became available (and, immediately, preferred):

open(FH, '>', $filename);

What version of Perl did we get that syntax with?


Solution

  • When you have those sorts of questions, start crawling back through the perl*delta documents. You can mostly skip the minor versions since those versions shouldn't introduce major features.

    In this case, you'd find it in perl56delta.