I've been banging my head against a wall trying to figure out a problem I first raised here
. I have tried eval and some hairier possibilities, but nothing got me the errors/warnings coming from java command line tools like Xalan
. Was it Java, Perl or me? Of course, it was stupid little me.
I figured it was time to take the dive (leap of faith?) into Interprocess Communications and follow tilly's advice. I settled in with dread and excitement to read Lincoln Stein's new book Network Programming with Perl. On page 43 my eyes popped out of my head, when I read, "On UNIX systems, you can use the Bourne shell's output redirection system to combine the subprocess's standard error with its standard output like this:
$ls_output = `ls 2>&1`;
Now $ls_output will contain both the standard error and the standard output of the command." Thank you Lincoln Stein for that gem (2>&1), that removes a few barriers I've been chipping away at for a few weeks now. I was fearing I was going to have to adopt an all Java solution, which would suck. But alas, Perl (and its community) comes through again.
I'm going to work on some applications with this and post them to the snippets section. Do you see any warning flags with this kind of solution?
I'd also like to know if any of you have experience suggesting additions to the perldocs. If this gem had been there and in the right place(s) I would have saved hours of development time.
Get Strong Together!!
Edit: chipmunk 2001-05-15