CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
restrict a module to only particular lines of code

 



ttamlrep
Novice

Apr 6, 2017, 2:46 PM

Post #1 of 3 (1720 views)
restrict a module to only particular lines of code Can't Post

I want to use the module re::engine::TRE in my script for certain regex's, but not all the regex's in the script.

re::engine::TRE brings in a different regex engine than what is default in Perl, but it will not work with all my regex's in the script.

What is the best way to do this ?


BillKSmith
Veteran

Apr 7, 2017, 6:34 AM

Post #2 of 3 (1710 views)
Re: [ttamlrep] restrict a module to only particular lines of code [In reply to] Can't Post

The very first sentence of the DESCRIPTION section of the module's documentation states (emphasis added):

Quote
Replaces Perl's regex engine in a given lexical scope ...


This is the same scope that applies to 'my' variables.
Good Luck,
Bill


Laurent_R
Veteran / Moderator

Apr 7, 2017, 1:37 PM

Post #3 of 3 (1704 views)
Re: [BillKSmith] restrict a module to only particular lines of code [In reply to] Can't Post

Cross-posted on Perl Monks: http://www.perlmonks.org/?node_id=1187423

There is nothing wrong with cross-posting questions, but it is considered polite to inform the reader and provide links, to avoid duplication of work in various parts of the Internet.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives