Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Four part JAPH

by ghenry (Vicar)
on Apr 18, 2005 at 13:09 UTC ( #448835=note: print w/ replies, xml ) Need Help??


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!!!


Comment on Re: Four part JAPH
Download Code
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|>.

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!!!
        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

        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

      Haven't tried to de-obfuscate it (yet), but why not the use of $^X instead of the mandatory first line?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://448835]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2014-11-23 07:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (129 votes), past polls