SPUG: geting the perl version

Atom Powers atom.powers at gmail.com
Wed Jan 25 11:01:56 PST 2006

I have tried all of these:
PerlVer = ( ExecResult(/usr/bin/perl -V:version | /usr/bin/cut -d "'" -f 2) )
PerlVer = ( ExecResult(/usr/bin/perl -e'printf "%vd\n", $^V') )
PerlVer = ( ExecResult(/usr/bin/perl -MConfig -le'print $Config{version}') )

The first one returs "version='5.8.7';"
The rest ruturn "Can't find string terminator "'" anywhere before EOF
at -e line 1."

This leads me to believe that the ExecResult function doesn't quotes.

On 1/25/06, Yitzchak Scott-Thoennes <sthoenna at efn.org> wrote:
> On Wed, Jan 25, 2006 at 10:45:28AM -0800, Atom Powers wrote:
> > Thank you, that does whan I want.
> > But still doesn't work from within my application.
> Can you show how you are trying to invoke perl in your application?
> What does "doesn't work" mean?  Bad output?  No output?  Error messages?
> Does it actually find perl on the path?

Perfection is just a word I use occasionally with mustard.
--Atom Powers--

More information about the spug-list mailing list