in reply to Get file version information in Perl

This is experimental. I took davido's suggestion and expanded it a little. I tested it against gnuplot and perl. It won't work on all executables, so you'll need to play with it.
#!/usr/bin/perl use strict; use warnings; use SVN::Notify; my $exe = SVN::Notify->find_exe('gnuplot'); system("$exe -V");

Replies are listed 'Best First'.
Re^2: Get file version information in Perl
by ikegami (Patriarch) on May 18, 2011 at 07:02 UTC

    Using -v, -V or --version doesn't work at all for .dll files, and I didn't find any .exe for which that worked.

    Even for programs that do recognise one of these, the option causes far more than the version to be returned.

      It doesn't even work for perl, not that all versions of perl include such information
      $ sigcheck -a -h -e -i -q C:\perl\5.12.2\bin\MSWin32-x86-multi-thread\ +perl.exe c:\perl\5.12.2\bin\mswin32-x86-multi-thread\perl.exe: Verified: Unsigned File date: 5:11 AM 10/16/2010 Publisher: n/a Description: n/a Product: n/a Version: n/a File version: n/a Strong Name: Unsigned Original Name: n/a Internal Name: n/a Copyright: n/a Comments: n/a MD5: 8d75c8a4ca154a3c5a55d0db5f45ad83 SHA1: fda7cb1ffa77e1497a6e6b372cec065240aabfb7 SHA256: 062b62f5981aee65d63d16c140f558f6aa8d06d192b7449b21b3e0 +7eb5196a0b $ perl -V |grep 2010 Compiled at Oct 16 2010 05:10:19
Re^2: Get file version information in Perl
by Anonymous Monk on May 18, 2011 at 06:56 UTC
    s/experimental/wishful/