Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: s///g within m//g regions

by tybalt89 (Monsignor)
on Nov 09, 2021 at 14:16 UTC ( [id://11138620]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    my $want = $have =~ s{\|[^|]*\|}{ $& =~ tr/*/-/r }ger;
    
    print "$have\n$want";
    
  2. or download this
    # turn * into - within |...| regions
    A |simple*example| is |so*simple| to come*up |with
    ...
    # turn * into - within |...| regions
    A |simple-example| is |so-simple| to come*up |with
    these-days|
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-26 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found