develooper Front page | perl.perl6.users | Postings from September 2022

Re: BEGIN {} question

Thread Previous | Thread Next
Andinus via perl6-users
September 2, 2022 03:20
Re: BEGIN {} question
Message ID:

ToddAndMargo via perl6-users @ 2022-09-01 10:30 -07:

> On 9/1/22 00:45, Richard Hainsworth wrote:
>> Treat the regexes as data for a program. Compile the program once.
>> Run the regexes as often as you need.
> Please elucidate.  That could save me boat loads
> of time.

You could take the regex string from an environment variable or read
from a file. The program is compiled only once and you can test regexes
without re-compilation.

Thanks Richard, this is going to save me a lot of time.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About