CPAN上有个模块 Tie::RegexpHash ,可以让regexp作为hash的key。(不过我也没用过)
Description: use regular expressions as hash keys Tie::RegexpHash allows one to use regular expressions as hash keys via the standard tied hash interfaces in Perl, or through PerlOO methods. Homepage: http://search.cpan.org/dist/Tie-RegexpHash/ -- gyx -- 您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。 要向此网上论坛发帖,请发送电子邮件至 [email protected]。 要取消订阅此网上论坛,请发送电子邮件至 [email protected]。 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
