gjoshi has asked for the wisdom of the Perl Monks concerning the following question:
I have very simple program where I have find out version of Python installed on machine.
#!/usr/local/bin/perl -w use strict; use warnings; open STDERR, '>&STDOUT'; $|=1; print "Hello World \n"; my $tmp = `python -V`; print "Version: $tmp \n"; ~
$tmp is not printing anything, looks like it is blank. output is as follows: Hello World Python 2.6.6 Version: But i am not able to capture the OP. Could anyone please tell me how to get the info?
thanks --girija
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Python -V command not returning any value
by vinoth.ree (Monsignor) on Sep 28, 2015 at 07:21 UTC | |
|
Re: Python -V command not returning any value ( Capture::Tiny )
by Anonymous Monk on Sep 28, 2015 at 06:58 UTC | |
by gjoshi (Sexton) on Sep 28, 2015 at 07:50 UTC | |
by mr_ron (Deacon) on Sep 29, 2015 at 02:46 UTC |