in reply to Re: version retrieval difficulties
in thread version retrieval difficulties

This doesn't work at all
Yeah, indeed,
$ perl -le 'open VER, "python -V |", \*STDERR or die $!; Unknown open() mode 'python -V |' at -e line 1.
Did you even test your code?

I usually prefer the backtick operation:

$ perl -le 'chomp($v = qx/tar --version 2>&1/); print $v' tar (GNU tar) 1.15.1

Update: Just for the record, tar version info goes to STDOUT.

Replies are listed 'Best First'.
Re^3: version retrieval difficulties
by shandor (Monk) on Apr 13, 2007 at 15:08 UTC
    Did you even test your code?

    Yes, and it didn't work at all, which is why the messages. :)

    The code wasn't meant to work, but to suggest a possible place to start looking since, after quite a bit of searching, I couldn't find any references to reading from STDERR. I guess I should have put a warning in my post.