in reply to Returning a match

After a quick glance over the documentation to \Q...\E I'd try

$cache_ref->{Index}[$i]=~/(\Q$fromto_digest\E)/ or ref->{Index}[$i]=~/ +(\Q$tofrom_digest\E)/)

because I read the docu as to mean, that in your case the parens and everything will be quoted after the \Q

I'm tired, so don't count on me ;-)

regards,
tomte


Edit: ++pfaut, I knew there was something 'fishy' but couldn't get it