[tpm] Replace a string with the result of shell command

Antonio Sun antoniosun at lavabit.com
Sat Jan 9 09:52:36 PST 2010


Hi,

Here is the simplified example of what I want to do:

  DB<1> $v = 'AAabcDDabc'
  DB<2> $v = m/abc/`echo $& | rev`/g
Backticks found where operator expected . . .

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.

Please help.
Thanks

Antonio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20100109/fd06734d/attachment.html>


More information about the toronto-pm mailing list