[Catalyst] Catalyst calendar/2005/10, TIMTOWTDI,
determining the perl version
A. Pagaltzis
pagaltzis at gmx.de
Tue Jan 24 19:14:25 CET 2006
* Karl Gaissmaier <karl.gaissmaier at uni-ulm.de> [2006-01-24 18:25]:
>just stumbled over the following *nix line:
>
>perlversion=`perl -v | grep 'built for' | awk '{print $4}' | sed -e 's/v//;'`
>
>TIMTOWTDI
>
>perlversion=`perl -e 'printf("%vd", $^V)'`
eval `echo -n perl; perl -V:version`
Though that doesn’t produce *exactly* the same output.
Regards,
--
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
More information about the Catalyst
mailing list