in reply to Re^4: PDF output to temp file
in thread PDF output to temp file
G'day Ronald,
I think it's possible that we've both slightly misconstrued the other's intent and that this has been exacerbated with each response. I'll address both the general issue of system($cmd) vs. `$cmd` and then look at the more specific case raised by AM.
In general, I avoid platform-specific code. On the rare occasions when this isn't the case, I'm more likely to choose system($cmd) for exactly the reasons you state: "you communicate to the reader more clearly what's going on". I believe we're in agreement with respect to this general case of usage. If I have a reason not to use system(), I'd normally choose qx{$cmd} over `$cmd`.
AM's original question contained garbage code. I cobbled together various elements of what he had, to produce something which did what he asked for: temp_1, >>/home/administrator and `evince bill.pdf`; was munged into `evince bill.pdf >> /home/administrator/temp_1`;. I retained the append mode (>>) which he'd used although I'm not convinced that he didn't actually want write mode (>); similarly, I retained the backquotes. I stated that I didn't think he'd described what he really wanted and queried what he was using $rc for.
-- Ken
|
|---|