Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Executing CGI/web form directives in regex substitution without pages of code

by Polyglot (Chaplain)
on Feb 19, 2020 at 20:03 UTC ( [id://11113174]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $substitute = qq|s~$sv$ch$ww$searchQuery$ww$ch$ev~$replacement~g$in;|;
    $line =~ $substitute;
    
  2. or download this
    sub processReplacements {
    my $regexM = shift @_;    #TERM(S) TO MATCH
    my $regexR = shift @_;    #REPLACEMENT TERM
    ...
    return @changed;
        
    } # END SUB processReplacements
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11113174]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-24 03:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found