My main objection to the two-line method is that it leaves the first value in scope for no good reason. This is exactly why I used the do BLOCK construct in my "workaround", so that the temporary value is never seen outside the assignment.
And qr// is a bit of an odd duck, anyway; it isn't doing actual matching. In a sense, it is replacing a string with a regex. So I don't find /e all that unnatural.
But one of the reasons I asked here was to get others' opinion on the matter. Thanks for the feedback, and I'm curious what others will have to say about it. :)
In reply to Re: Re: qr// with /e?
by tkil
in thread qr// with /e?
by tkil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |