Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
singingfish
on Oct 7, 2015
|
parent
|
context
|
favorite
| on:
Differences Between Perl 5 and Perl 6
don't use $1, use named captures or list assignment. qr/\$\d+/ is a oneliner thing or a code smell.
nikatwork
on Oct 8, 2015
[–]
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.
bmn_
on Oct 8, 2015
|
parent
[–]
Use named captures or list assignment. $1 $2 etc are already a code smell in Perl 5. Action-at-a-distance is the enemy.
nikatwork
on Oct 8, 2015
|
root
|
parent
[–]
That's needlessly verbose if I am descoping $1 within a line or two. I agree one must be careful.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: