in reply to typo or more changes coming our way?
in thread Good Idiom for Matching List?

In perl6, the /foo/ operator is qr-ish. However, in certian contexts (bool context, numeric context, stringy context, and basicly any other context that can't hold a regex), that means that the regex will be created, matched against, and then thrown away (that will probably get optimized a fair bit). However, yes, my $goodnames=/@names/ will set $goodnames to a regex that matches when any of the things in @names (taken literaly) match the target.


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).