sourcecode
bart
@perl -M%1 -le "print $%1::VERSION"
Sometimes you wonder what version of a module you have, and it's easy enough to come up with a oneliner to do it, loading the module and printing out the value in its $VERSION package variable. However, life can be somewhat easier still, and so I wrapped this oneliner into a .bat batch file (for Windows/DOS). So copy this one line, paste it into a new text file "<tt>version.bat</tt>" (avoid adding newlines if you can), and save somewhere in your path — I saved it in my perl/bin directory, next to the perl executable.
<p>Use it from the "DOS" shell as:
<blockquote><code>version CGI</code></blockquote>
or
<blockquote><code>version DBD::mysql</code></blockquote>
Utility scripts
[bart]