From Babylon to Pascal with Perl 6
perl6.eu
perl6.eu
For someone who has never tried Perl I would suggest learning it and using it for scripting.
[1] https://en.wikipedia.org/wiki/Perl_6#Major_changes_from_Perl...
And of course the best thing that they fixed from Perl 5 is the community. If you have an interest in learning more about the language, come by on #perl6 on freenode and we'd be glad to help you out.
As an example, if I run:
perl -pi.bak -e "s/;/,/g" mycsv.csv
Would there be any difference?In your particular example, the global flag is now an adverb you put in front, and characters like ; now have to be backslash-escaped or quoted, ie
s:g/\;/,/
Sadly, the Perl6 regex/grammar engine is rather slow, taking away from its potential as a 'killer feature'...One could say that at its inception and heyday, Perl more or less defined what a "scripting" language could/should be, making things like string processing and list/dictionary handling very convenient, mixing multiple paradigms, and facilitating community modules. That certainly seemed to have influenced JS, Ruby, and Python (Perl's scripty siblings) but I think many people would say these are now considered better executions of those core ideas.
But are they really the apotheosis of this kind of language? How else could you grow/change a language like this in order to make it more convenient, powerful, or interesting? (Or less politely: what would make something as great as Ruby or Python look relatively blub-ish?)
I see Perl 6 as an answer to that question, perhaps in a similar way that one might say Rust answers that question for systems languages.
Should be 4 2^2 x 3^0 x 5^0 (4 x 1 x 1)