in reply to issue in regular expression

Why the braces in @{temp}? That might be indicative of some other problem.

See How to ask better questions using Test::More and sample data