Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
XP is just a number
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Not counting the data section,

i get a score of 128. i'm not counting the data section since anyone golfing will need the input, so it shouldn't be counted. That's my theory at least. Anyway, here's my attempt:

#23456789_123456789_123456789_123456789_123456789_123456789_123456789_ $_=<DATA>;push@_,@+while/_/g;{for$a(0..$#_){substr($_,$_[$a]-1,1 )=$;,$|++if($;=@{[/$a/g]})!=substr$_,$_[$a]-1,1}$|--&&redo}print __DATA__ The number of 0s in this sentence is _, of 1s is _, of 2s is _, of 3s +is _, of 4 s is _, of 5s is _, of 6s is _, of 7s is _, of 8s is _, and of 9s is _ +.
On the other hand, here's a much shorter 77 byte solution that's less interesting. It uses the same data section as above. Please note in both cases there should be no "\n"s in the data.
sub{$a=<DATA>;$a=~s,($_.*?)_,$1.pop,efor-1..9;print$a}->(1,1,2,1,1,1,2 +,3,7,1)
enjoy,
jynx

In reply to Re: Re: Hofstadter Metapuzzle by jynx
in thread (OT) Hofstadter Metapuzzle by MeowChow

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    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-04-18 04:51 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (461 votes), past polls