

2·
17 days agoI genuinely love the idea of the $1 after a match. It feels so natural in perl! So many things are text matching.
But! But! But!! Those $ variables are dynamic scoped! If you call a method and it matches stuff you lose the variables!
I’ll bet there is a way around it. But it made me so sad.
I think it came up more like
if ($inString =~ /^([ \t]+)(.*)$/ && has_a_cow($2)) {For me. I dunno. I was never good at perl. I just wanted to hack something together.