SPUG: geting the perl version

Colin Meyer cmeyer at helvella.org
Wed Jan 25 10:34:21 PST 2006

On Wed, Jan 25, 2006 at 10:28:55AM -0800, Atom Powers wrote:
> I want to do this: `/usr/bin/perl -V:version | /usr/bin/cut -d "'" -f
> 2` without using pipes or quotes; is that possible? (for some reason
> my application isn't executing this correctly)
> That is; I am looking for a simple way to get just the version number
> wihout any padding. Something like "5.8.7" or "5.0.6" or whatever.

>From the perlvar manpage:

  perl -e'printf "version is v%vd\n", $^V'


More information about the spug-list mailing list