views:

111

answers:

2

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?

+11  A: 

Looks like 5.6.0.

chaos
In other words, Late Jurassic :)
DVK
Some of my early professional sysadmin tasks were done in Perl 4, when it was *new and exciting*. You kids get your "fire" and your "wheel" off my grass.
chaos
Aah, I was curious if `open my $fh, '>:raw', $filename` came about at the same time -- it appears so.
ephemient
ephemient: ':raw' is an io layer, they were added in 5.8.0.
Alexandr Ciornii
@Alexandr Ciornii: `perl56delta` says that `:raw` and `:crlf` are new in 5.6.0, though. Perhaps not in the same form as in 5.8.0?
ephemient
Although you found the answer, how you found the answer is probably the interesting part. So, what did you do? :)
brian d foy
Since the perl deltas aren't in a subdirectory or anything, the trick winds up being googling `site:perldoc.perl.org +"History / Changes" <what you're looking for>`.
chaos
+5  A: 

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.

brian d foy