Appologies for the pun, but as it happens that is my question.
I am writing a Perl application whose default output is XML. What I would like is to provide an extensible feature that allows the user to process this XML.
The use of shell's | is not applicable as multiple XML outputs are possible in a single run (for each command arg there is a XML output).
My initial thought was to pass the path to a Perl script as an arg to my Perl script and then do() the users Perl script. However that doesn't work. I want the code to be executed, not evaluated.
I've thought about using exec(). But I'm not sure that passing a multiline string (that could be 1000's of lines long) is a Good Thing (TM). Nor am I aware of a way of passing a Perl object via the shell.
So I throw this open to you wise brethren. How do I get my Perl script to execute a user provided code given via a command line argument?
Cheers
Internet Pixie
In reply to should I do() this? by internet_pixie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |