http://www.perlmonks.org?node_id=996133


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.