Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Code Golf: Four is magic

by duelafn (Vicar)
on Jul 14, 2010 at 01:50 UTC ( #849402=note: print w/replies, xml ) Need Help??


in reply to Re^3: Code Golf: Four is magic
in thread Code Golf: Four is magic

Doesn't seem to work right -- ($1&&$x[$1]+7) adds 7 too often and !!$& has issues with "000".

# 123456789_123456789_1 # onemilliontwentyfour # onethousandtwentyfour echo 1000024 | perl duelafn.pl 1000024 is 20. 20 is 6. 6 is 3. 3 is 5. 5 is 4. 4 is magic. echo 1024 | perl duelafn.pl 1024 is 21. 21 is 9. 9 is 4. 4 is magic. echo 1000024 | haarg.pl 1000024 is 13. 13 is 8. 8 is 5. 5 is 4. 4 is magic. echo 1024 | haarg.pl 1024 is 13. 13 is 8. 8 is 5. 5 is 4. 4 is magic. echo 1000024 | perl thundergnat.pl 1000024 is 17. 17 is 9. 9 is 4. 4 is magic. echo 1024 | perl thundergnat.pl 1024 is 13. 13 is 8. 8 is 5. 5 is 4. 4 is magic.

Update tracked doiwn more details of the bugs.

Good Day,
    Dean

Replies are listed 'Best First'.
Re^5: Code Golf: Four is magic
by Haarg (Chaplain) on Jul 14, 2010 at 03:04 UTC
    I did miss some things there. You should still be able to eliminate the @_ from the pop though.

      Nope, outside a sub it will pop from @ARGV not @_

      Good Day,
          Dean

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://849402]
help
Chatterbox?
[ambrus]: Corion: which coordinate system is the upside down one?
[Corion]: ambrus: "the other" ;) To me, "normal" for GUIs means (0,0) is left-upper corner of the monitor/window. But for Prima, the lower-left corner it is ;)
[Corion]: Which would be OK for mathematics and paper, for me ;)
[ambrus]: Ok, so Prima has a postscript-like coordinate system
[Corion]: ambrus: Yes, which kinda makes sense because Prima also has Postscript output or something, I think

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2016-12-09 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (150 votes). Check out past polls.