in reply to Re: Precompiling qr/.../o question
in thread Precompiling qr/.../o question
It is my understanding that this is precisely what recent Perl implementations do.
Then your understanding is flawed. There's a cache, but it only holds one value: the last regexp compiled for that operator instance.
>perl -Mre=debug -e"qr/$_/ for qw( foo bar bar foo )" 2>&1 | find "Com +piling" Compiling REx `foo' Compiling REx `bar' Compiling REx `foo'
|
|---|