
abigail at abigail
Nov 17, 2009, 2:46 PM
Post #3 of 3
(196 views)
Permalink
|
On Wed, Nov 18, 2009 at 12:25:55AM +0200, Alexandr Ciornii wrote: > Hello > > I'm working on "Perl-MinimumVersion" CPAN dist. It is a tool that > detects minimum Perl version to run a Perl program. > > perl5005delta.pod lists "EXPR foreach EXPR" as one of changes in 5.5. > I don't understand what "foreach EXPR" means. I tried several > examples: > > print "$_," foreach split //,"asdf"; > > print "$_," foreach (1,2,3,4); > > print "$_," foreach 'asdf'; > > They all work in perl 5.004_05. 5.004_05 was released after 5.005. At that time, (major) releases were more frequent, and p5p had a different policy when it comes to putting new features in maint releases. At that time, there were only 'delta'pods for major releases, not for maint releases. Also, IIRC, it was Chip who created the "EXPR for(each) EXPR" construct. And it was Chip who released 5.004_05. I no longer have 5.004 perls laying around, but I wouldn't be surprised if your code snippits will not work on 5.004_04. Abigail
|