Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: a prime bug

by shmem (Chancellor)
on Jun 11, 2017 at 11:41 UTC ( #1192520=note: print w/replies, xml ) Need Help??


in reply to a prime bug

Nice. But __END__ should be __DATA__ and __END__ be -- well, at the end.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^2: a prime bug
by ownlifeful (Acolyte) on Jun 11, 2017 at 11:52 UTC
    I suppose, if you want to be formal about it.
    iirc, __END__ and __DATA__ are equivalent, and that's why the script runs. Please correct me if you know otherwise.

      Running a script - perl script.pl - the tokens make no difference. But if you invoke perl on the command line to read STDIN and paste the script, __END__ makes DATA into STDIN, and you have to type Ctrl-d to close STDIN/DATA. Not a big deal, but that's the difference ;-)

      perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
Re^2: a prime bug
by Jambo Hamon (Novice) on Jul 07, 2017 at 01:28 UTC
    All comments so far are awesome. I felt like the bug when i read it ... ;]

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1192520]
help
Chatterbox?
LanX will call his fifth son "Edsger"
[karlgoethebier]: erix: ...there is still the other Donald
LanX unfair Knuth has a "pipe organ"
LanX has only an ordinary nose.

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2017-12-12 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (335 votes). Check out past polls.

    Notices?