3 ms·
For Perl, you might want to look at https://metacpan.org/pod/IPC::Run3 https://metacpan.org/pod/IPC::Run3 You can: - specify each argument separately - get s
by mfontani 5y ago
For Perl, you might want to look at https://metacpan.org/pod/IPC::Run3 https://metacpan.org/pod/IPC::Run3
You can:
- specify each argument separately
- get separate stdout and stderr
- provide input
- dale_glass 5y agoOh, I know. There's that, and File::Slurp, and a bunch of other stuff one would think would exist from the start, but for some reason don't. But those are all external modules that somebody had to write, that didn't exist at some point in time, and which sometimes one can't use because in some cases you can only rely in what's in core. I'm just wondering at that bizarrely enough, Larry Wall (or somebody else) found it useful to have a simple, convenient way to execute a command with exact arguments, but not for when you need its output. I must have written the same wrapper around open() several dozen times by now, due to needing to write scripts for cases where installing dependencies is undesirable.
- dolmen 5y ago> I'm just wondering at that bizarrely enough, Larry Wall (or somebody else) found it useful to have a simple, convenient way to execute a command with exact arguments, but not for when you need its output. It had backquotes from the start. So it was as convenient (and as unsafe) as the Bourne shell. Of course you quickly want more safety and backquotes are just legacy you can never use for serious stuff.
- deleted 5y ago[deleted]