$ perl -le 'use IO::Socket; print $IO::Socket::VERSION' 1.31
You can also use the '''-MModule::Name''' parameter to the perl executable rather than a ''use'' statement:
$ perl -MIO::Socket -le 'print $IO::Socket::VERSION' 1.31
PS C:\> perl -le 'use IO::Socket; print $IO::Socket::VERSION' 1.31
From cmd.exe:
E:\>perl -MIO::Socket -e "print $IO::Socket::VERSION" 1.31
Read more about Perl from PowerShell and cmd.exe here.
The command '''perl -v''' should tell you:
$ perl -vThis is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
Copyright 1987-2009, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Or you can print the special '''$]''' variable in a one-liner:
$ perl -le 'print $]' 5.010001Perl Linux Windows All Categories
Minimum cookies is the standard setting. This website uses Google Analytics and Google Ads, and these products may set cookies. By continuing to use this website, you accept this.