in reply to Built

Output with perl5.005_03: Jut aher prl haPke5 When writing a JAPH that depends on input from outside the script, try to make sure that the source provides the same data across systems. Barring that, inform the reader under which versions of perl the JAPH is known to work.

This JAPH grabs the output from perl -V, which varies, of course, based on the platform, the version of perl, and the configuration options specified when perl was built. And that's the first perl in the path, rather than the perl that's running the JAPH. (Consider using $^X to run the same perl that's running the script.)

Replies are listed 'Best First'.
Re: Re: Built
by iamcal (Friar) on Jun 07, 2001 at 12:11 UTC
    Revised version to work on Activeperl and normal perl:
    ($_)=(`perl -V`=~m((.*)));s+\(.*\)++;my@a=split/\s+/;$_='-K0 1-t-u-!044c4149-i3105-!30310533-!-i0440-l3147';s(\s)[]g;for( (m((..))g)){my@c=split//;if($c[0]eq'-'){$_=ord$c[1];$_=chr$_ -1;}else{split//,$a[hex$c[0]];$_=$_[hex$c[1]];}print;}
Re: Re: Built
by iamcal (Friar) on Jun 07, 2001 at 11:57 UTC
    Urgh. I realise that the output of perl -V varies but thought the first line was consistent. It expects the first line to be

    Summary of my perl5 (revision x version x subversion x) configuration

    but on (my) linux it's

    Summary of my perl5 (x patchlevel x subversion x) configuration

    Entirely my fault for not testing cross platform.