http://www.perlmonks.org?node_id=448835


in reply to Four part JAPH

Hi cog, does this mean 3 more parts are coming?

I ran the above using ActiveState 5.8.6, on Win2k, and got:

R`st anothma [map hackma,

I don't think that's right? ;-)

Thanks.

Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!

Replies are listed 'Best First'.
Re^2: Four part JAPH
by cog (Parson) on Apr 18, 2005 at 15:23 UTC
    Problem solved (I think), thanks to Jody Belka (knewt) on #perl.

    ghenry, the file must include the #! line :-)

      I'm a Linux junkie, but I thought on Windows, you always had to just have the code in a text file and run it with:

      perl textfile

      Walking the road to enlightenment... I found a penguin and a camel on the way.....
      Fancy a yourname@perl.me.uk? Just ask!!!
        I'm a Linux junkie, but I thought on Windows, you always had to just have the code in a text file and run it with:
        There's also the ASSOC and FTYPE commands for Windoze:
        ASSOC .pl=PerlScript FTYPE PerlScript=perl.exe %1 %*

        -QM
        --
        Quantum Mechanics: The dreams stuff is made of

        Don't know if there are other ways. But in this case cog uses the first line to extract the 'Perl' word and that's why the code needs it.

        Alberto Simões

      Haven't tried to de-obfuscate it (yet), but why not the use of $^X instead of the mandatory first line?
Re^2: Four part JAPH
by cog (Parson) on Apr 18, 2005 at 13:18 UTC
    Hi cog, does this mean 3 more parts are coming?

    No, it means that the japh is calculated in four different parts :-) Try to deobfuscate it :-)

    R`st anothma [map hackma,

    At first glance, I'd say that I'm relying on some special variable that holds a different value in your system... :-\ To find out which... oh boy... :-\

    I'm saying this because I refrained myself from using $^F precisely because it could change...

    Hum... I'd say $= doesn't hold 60 in your system... am I right? :-\

      Nope ;-)

      perl -e "print $="

      Gives 60, on a Win2k, ActiveState 5.8.6 install.

      Walking the road to enlightenment... I found a penguin and a camel on the way.....
      Fancy a yourname@perl.me.uk? Just ask!!!
        Well, the word "Perl" should come out right as long as $=/($*+$,)+$| equals 11 and $; equals 0.

        By the time the code gets there, $| is 1, $* is 2 and $, is 4, so $=/($*+$,)+$| = 60/(4+2)+1 which in turn equals 11. In your case, the result of that operation is probably returning 27 instead of 11 (if I did my calculations right).

        One of those four variables is not getting the proper value it should. Try this: in the code, right before $a="\104\101\124\101", add something like print"<$=|$*|$,|$||$;>\n";, and then we'll be able to see what's wrong :-)

        The correct output for that code should be <60|2|4|1|>.