in reply to Re: Python -V command not returning any value ( Capture::Tiny )
in thread Python -V command not returning any value
I came up with a solution using IPC::Open3 before reading your posting with more care. I am new to Capture::Tiny and thank you for the introduction. IPC::Open3 also works but Capture::Tiny can provide something simpler. Your code is interesting pedagogically but the example is as complicated as an open3 solution and maybe a little overkill for the problem.
use strict; use warnings; use Capture::Tiny 'capture_merged'; my $python_ver = capture_merged { system('python', '-V') }; print "Python version is: $python_ver\n";
|
|---|