<br><br><div class="gmail_quote">On Mon, May 14, 2012 at 12:06 PM, Antonio Sun <span dir="ltr"><<a href="mailto:antoniosun@lavabit.com" target="_blank">antoniosun@lavabit.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I need to calculate 12+34, then pipe this expression result through an external shell filter command, say 'rev'. </div><div><br></div>
<div>ultimately, I'm going to use the whole expression in the second part of string replace 's/.../.../eg' operation. </div><div></div></blockquote></div><br><div>Maybe I have to do it in two steps:</div><div>
<br></div><div><div> perl -e '$str = "1234"; $str =~ s/1234/$var = $&; `echo $var | rev`/e; print $str'</div></div><div><br></div><div>Thanks</div><div><br></div>