Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: search and replace

by johngg (Abbot)
on Sep 28, 2012 at 08:10 UTC ( #996133=note: print w/replies, xml ) Need Help??


in reply to search and replace

Something like this perhaps.

perl -pi.bak -e 's/^(mail)( xmlfeedback)(.*)/$1$3$2/' *.sh

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: search and replace
by Peamasii (Sexton) on Oct 04, 2012 at 10:38 UTC
    Thank you, this solution worked great! I didn't dive into the Regexp solutions because I suspected there was a simple way to switch those tokens around just like this solution does. I just couldn't find an example anywhere. Thanks again for everyone's help.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996133]
help
Chatterbox?
[Corion]: talexb: How about convert( decimal( 10,0 ), EXPR )) ? ;-D
[Corion]: On the upside, $work has published two openings for cow-orkers; we'll see whether someone wants to work here ;)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-08-16 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (265 votes). Check out past polls.

    Notices?