in reply to Re^3: Regex with variables
in thread Regex with variables

If the OP's data was indeed in a list, I'd probably opt for grep(), if grep(/$test/, @list).... The good thing about Perl, is TIMTOWTDI ;)