Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Pulling JAPH out of the iterated SHA512 of the code...

by Grimy (Pilgrim)
on Jun 07, 2011 at 17:58 UTC ( #908534=note: print w/ replies, xml ) Need Help??


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

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.


Comment on Re^2: Pulling JAPH out of the iterated SHA512 of the code...
Re^3: Pulling JAPH out of the iterated SHA512 of the code...
by Your Mother (Canon) on Jun 07, 2011 at 18:08 UTC
    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.
        uname -a Linux ... Tue Oct 7 10:12:35 PDT 2008 i686 i686 i386 GNU/Linux # plus... perl -v This is perl, v5.8.8 built for i386-linux-thread-multi
      Works for me, using curl exactly as you did :-o

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (14)
As of 2014-09-22 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls