Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nikatwork
· 11y ago · 0 comments
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.
Comments
[–]
bmn_
11y ago
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
OP
11y ago
That's needlessly verbose if I am descoping $1 within a line or two. I agree one must be careful.