News for hackers. Stuff that matters.
Re:Differences Between Perl 5 and Perl 6 by acqq on Wednesday October 07, 2015 @02:20PM (#10347857)
It seems "disturbing" is the good word here, as the kind of changes in the semantics or notation between Perl 5 and Perl 6 almost guarantees that most potential users would have to decide if they are going to reject using one or another: The need to "read differently" on the distant look similar code demands too much from the people who'd just like to "get the job done."

What's that $1? Well it's the first match if it's Perl 5 but it's a second match if it's Perl 6. But don't worry, the other things in expressions also have sometimes other meanings.

Re:Differences Between Perl 5 and Perl 6 by singingfish on Wednesday October 07, 2015 @05:34PM (#10349273)
don't use $1, use named captures or list assignment. qr/\$\d+/ is a oneliner thing or a code smell.
Re:Differences Between Perl 5 and Perl 6 by nikatwork on Wednesday October 07, 2015 @10:03PM (#10350447)
It's not a smell if you are doing an asston of text munging. Rather than write one ginormo regex I prefer a sequence of short actions. It's easier to debug and reason with.
Re:Differences Between Perl 5 and Perl 6 by bmn_ on Thursday October 08, 2015 @09:17AM (#10352533)
Use named captures or list assignment. $1 $2 etc are already a code smell in Perl 5. Action-at-a-distance is the enemy.
Re:Differences Between Perl 5 and Perl 6 by nikatwork on Thursday October 08, 2015 @07:28PM (#10357121)
That's needlessly verbose if I am descoping $1 within a line or two. I agree one must be careful.