I was going to post the following to the Snippets section when I came across your nicer version:
perl -le 'eval "require $ARGV[0]" and print ${"$ARGV[0]::VERSION"} +' Module

Your method of printing the version number is cleaner as well:
perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Mod +ule

I'm glad that I searched before posting. ;-)

John.
--


In reply to Re: Find perl module version from command-line by jmcnamara
in thread Find perl module version from command-line by lachoy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":