Perl one liner to display module version info
Wednesday, April 29th, 2009I use this Perl one-liner to display the version number of a module. This module should be available in your @INC paths.
If I need to know the version of CGI.pm
$ perl -MCGI -e ‘print “$CGI::VERSION\n”‘
3.29
I created a shell script so that I can just type the module name.
$ cat pm_version.sh
#!/bin/sh
MODULE=$1
perl -M$MODULE -e ‘print “$’$MODULE’::VERSION\n”‘
So now, […]
