<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18854">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>This might be closer to what you want:</FONT></DIV>
<DIV><FONT size=2 face=Arial>$v = 'AAabcDDabc';<BR>$v =~ s/abc/`echo $& |
rev`/eg;</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Note: </FONT></DIV>
<DIV><FONT size=2 face=Arial>Replace '=' with '=~'</FONT></DIV>
<DIV><FONT size=2 face=Arial>Replace 'm' with 's'</FONT></DIV>
<DIV><FONT size=2 face=Arial>Use the /e operator</FONT></DIV>
<DIV><BR>Indy Singh<BR>IndigoSTAR Software -- <A
href="http://www.indigostar.com">www.indigostar.com</A><BR></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=antoniosun@lavabit.com href="mailto:antoniosun@lavabit.com">Antonio
Sun</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=tpm@to.pm.org
href="mailto:tpm@to.pm.org">TPM Mongers</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, January 09, 2010 12:52
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [tpm] Replace a string with the
result of shell command</DIV>
<DIV><BR></DIV>Hi, <BR><BR> Here is the simplified example
of what I want to do:<BR><BR> DB<1> $v = 'AAabcDDabc'<BR>
DB<2> $v = m/abc/`echo $& | rev`/g<BR>Backticks found where operator
expected . . . <BR><BR>Please don't take it literally, and argue that shell
invoking is not necessary -- I want to replace a certain string with the
result of shell command, and pass the matched string to the shell command as
well.<BR><BR>Please help.<BR>Thanks<BR><BR>Antonio<BR><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>toronto-pm mailing
list<BR>toronto-pm@pm.org<BR>http://mail.pm.org/mailman/listinfo/toronto-pm<BR></BLOCKQUOTE></BODY></HTML>