>854
あ、ごめんなさい。
よくみると '1' => '&test2;', '2' => '&test1;' で順序逆で勘違いしてました。。。

>862のベンチとってみました。
substrの方が速いですね。

1: ($b) = ($a =~ /(\w+)\)$/);
2: $b = substr($a, -8, -1);

Benchmark: timing 1000000 iterations of 1, 2...
1: 5 wallclock secs ( 4.95 usr + 0.00 sys = 4.95 CPU) @ 201892.74/s (n=1000000)
2: -1 wallclock secs ( 0.98 usr + 0.00 sys = 0.98 CPU) @ 1024000.00/s (n=1000000)