Originally Posted By: Talon
"cat /var/log/Xorg.0.log | grep nVidia" <== grep isn't part of cat, its a seperate command


That is a single "command" in the eyes of your script:

Code:
/exec -o cat /var/log/Xorg.0.log | grep nVidia


I'm not talking about number of executables, I'm talking about number of mIRC commands. Also note that the shell command above runs commands in sequence, not in parallel. My statement was that you cannot run more than one command *at once* (in parallel), not in sequence. For instance:

Code:
//exec -o cat /var/log/Xorg.0.log | /exec -o cat /etc/passwd


With your script, it looks like these two commands will get queued. In exec.dll, they will run simultaneously (replace -o with -a for async calls). This *can* be important functionality.

Also realize that a timer executing in 50ms intervals might seem fast, but if commands finish in <1ms you will be "blocking" for ~49ms. That's a big deal if you're relying on /exec many times in a larger script. A loop from 1-10 would spend half a second idling. That matters even more since for that 49ms you can't execute other commands-- since you have a bottleneck on the pexec.txt file. Again, ~50ms + ~50ms + ~50ms adds up to quite a noticeable delay, really fast. exec.dll reads immediately as data comes in, which will yield much better performance. You can benchmark your script against exec.dll to quantify the difference, if you'd like.

Originally Posted By: Talon
why such the force for a dll when its totally un-necessary?


There is no "force" for a dll. I'm simply pointing out that there are more powerful alternatives than shelling out to a perl script, and that your script has a few efficiency limitations (noted above). In some cases, this efficiency *is* necessary. FWIW there is also an "stdcatch" script written by Collective floating around that implements stdin/out piping (what exec.dll does) without needing a dll (uses COM instead). Not sure if that works in wine, but it might. I'd even recommend using that, if you don't want a DLL.

Let me flip it back on you: why such "force" against a dll?



- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"