While they do share the same root name and a number of other things, they are entirely different languages.

Quote

Was: $#array+1 or scalar(@array)

Yuck, why would you use that "was" syntax? That is rarely ever coded that way or at least I should say is should not be coded that way. You don't show how you would actually use it, but here is the normal way to code that.

Code

my $cnt = @array;

Similarly, your perl 5 (C style) for loop syntax is highly discouraged by most Perl coders. Instead you should be using Perl's for loop style.

Code

for (0..9) { ... }

Perl 6 should also support that style. In fact the documentation actually shows that style but puts the range in an array.

I have not tested perl 6 yet, but I plan on doing so soon. For the vast majority of the Perl coders, it's not a decision of whether or not to "switch"; it's a decision of whether or not to add another language to your repertoire.

although I'm still using Perl 5 most of the time, almost daily in fact (at least on working days), I started to learn Perl 6 a few years ago. At the very beginning, I was also somewhat upset by syntax changes such as some you describe, but once you get into it, you figure out that there are very good reasons for that and that, at the end of the day, the Perl 6 syntax is much more consistent than Perl 5 ever was. These syntax changes really make a lot of sense.

I should add that, if you know P5, then P6 is very easy to learn, because P6 really has the same spirit as P5.

I could write much longer on this -- after all, I wrote a full book on Perl 6, which you can read online for free or buy in printed form from Amazon and other book stores (http://greenteapress.com/wp/think-perl-6/. But, for now, I will only say that P6 is really a nice language which keeps everything nice that P5 has, and adds much more. Once you get past the few syntactical changes compared to P5 (which really does not take too much effort), you really feel at home and just enjoy it even more.

although I'm still using Perl 5 most of the time, almost daily in fact (at least on working days), I started to learn Perl 6 a few years ago. At the very beginning, I was also somewhat upset by syntax changes such as some you describe, but once you get into it, you figure out that there are very good reasons for that and that, at the end of the day, the Perl 6 syntax is much more consistent than Perl 5 ever was. These syntax changes really make a lot of sense.

I should add that, if you know P5, then P6 is very easy to learn, because P6 really has the same spirit as P5.

I could write much longer on this -- after all, I wrote a full book on Perl 6, which you can read online for free or buy in printed form from Amazon and other book stores (http://greenteapress.com/wp/think-perl-6/. But, for now, I will only say that P6 is really a nice language which keeps everything nice that P5 has, and adds much more. Once you get past the few syntactical changes compared to P5 (which really does not take too much effort), you really feel at home and just enjoy it even more.

Thanks very much for the link of your book, i'll definitely read it this weekend.