in reply to piping a function into a backtick shell
Have you looked at IPC::Open2? This allows you to both read from and write to another program via stdout and stdin of that program. It's a bunch more work than backticks, but incredibly simpler than doing the same thing in pure C.
Other methods include Expect, or properly quoting your string in your backticks. While that last one sounds tempting, let me dissuade you from it: it's easy to get something that usually works, but hard to get something that always works. Using IPC::Open2 will always work, once you get it working at all, because there's no nasty shell between you and your program (especialy lif you use the 'some', 'cmd', 'and', 'args' version).
|
|---|