Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Find pieces of text in a file enclosed by `@` and replace the inside

by bart (Canon)
on Mar 08, 2013 at 11:44 UTC ( #1022397=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    s/\@(.*?)\@/ ... /g;
    
  2. or download this
    s<\@(.*?)\@>{ ... }ge;
    
  3. or download this
    while(<>) {
        s/\@(.*?)\@/ subst($1) /ge;
    ...
        $s =~ s/([a-eA-C])/$r{$1}/g;
        return $s;
    }
    
  4. or download this
        s/\@(.*)\@/ subst($1) /ge;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-12-29 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (187 votes), past polls