in reply to version retrieval difficulties

The python -V command returns its output to STDERR instead of STDOUT, it seems. so, you probably have to have your OPEN command grab the input from STDERR... maybe like this:

open VERSION, "python -V |", \*STDERR or die "This doesn't work at all: $!\n";

Replies are listed 'Best First'.
Re^2: version retrieval difficulties
by Snigwel (Sexton) on Apr 12, 2007 at 20:12 UTC
    That's cleared up what exactly is going on, thanks! Now to see what can be done about it :0)
    ~~~~~~~~~~~~~~~~~~~~~~
    Timshel - bloody heck yes.
Re^2: version retrieval difficulties
by naikonta (Curate) on Apr 13, 2007 at 04:56 UTC
    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.
      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.