in reply to Pulling JAPH out of the iterated SHA512 of the code...

Or did you mean it prints ▒:▒v▒Y1_jg▒)Jd▒▒▒▒▒<љPuTTY$ PuTTY? Because that's what it prints for me from a file and it prints nothing from an "in term" execution.

  • Comment on Re: Pulling JAPH out of the iterated SHA512 of the code...

Replies are listed 'Best First'.
Re^2: Pulling JAPH out of the iterated SHA512 of the code...
by Grimy (Pilgrim) on Jun 07, 2011 at 17:58 UTC
    It's perfectly normal that it prints nothing from an inline execution. I don't know how you could "open FILEHANDLE $0" an inline code.

    When you copy it to a file, you have to make sure that it is an EXACT copy. Adding or removing a single whitespace anywhere will change the SHA512 and thus result in printing random characters, like what you had.

    Empty lines are really empty, there's one trailing newline at the end so that the downloaded version works too, and the end of each line is really the end of the line (no trailing spaces). Only the fifth line is indented with exactly 3 spaces.

      curl 'http://perlmonks.org/?abspart=1;displaytype=displaycode;node_id=908478;part=1' -o a.pl
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100   531    0   531    0     0   1618      0 --:--:-- --:--:-- --:--:--     0
      
      perl a.pl
      ▒-+▒v▒▒▒▒▒eվ▒▒* ▒@*▒}▒
      

      (updated, cleaned up command line.) You're right, copying it exactly did result in different output. :P

        I got it. I suppose you got this result with Windows. Windows newlines are CR+LF, while UNIX newlines are just LF. I'll try to write a platform independent version by s/ing the CR away.
        Works for me, using curl exactly as you did :-o