rjschwei has asked for the wisdom of the Perl Monks concerning the following question:
Generally this is pretty straight forward except in this case:
I know what is going on, xsltproc converts the file pointed to be $controlFile, this goes to stdout and the "|" at the end redirects, such that I end up with $XML being a file handle pointing to the converted file content.if (! open ($XML, "xsltproc $xslt $controlFile|")) { .... }
Now the not so pretty version of this would be for me to call xlstproc and send the output to a temporary file and then use the temporary file in an open statement with 3 arguments. However, I am thinking there is a more compact way of doing this that appeases perlcritic and does not require me to write a temporary file to disk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: clean up to PBP for open
by BrowserUk (Patriarch) on Nov 05, 2011 at 12:42 UTC |