If you have trouble understanding the second one, you should
look
up
the phrase
"Schwartzian transform", when you have some free time, and read up
on the technique.
Becomming comfortable with this is something that will help you to
think like an advanced Perl programmer. It's not just the technique
itself, but the paradigms that it represents, notably, the idea of
transforming a list, which is a very generally applicable thing and
something Perl is very good for doing, so that it is something every
really advanced Perl programmer needs to understand.
However, ad interim, you should use the technique that you
understand already.
Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. Why, I've got so much sanity it's driving me crazy.
| [reply] |
| [reply] |
the # needed to be escaped
I don't believe you. Pound signs never need to be escaped in regexes, and it shouldn't make any difference if they are or not. I invite you to show us your exact code — the one that behaves differently depending on whether the pound sign is escaped or not.
We're building the house of the future together.
| [reply] |
$_ = "SomecomplexREhereandthenafoobar";
if (/Some complex RE here and then a # to ignore/x) {
print "Escaping that # would have mattered\n";
}
| [reply] [d/l] |
| [reply] [d/l] [select] |