Good first japh joshua.
my$japh=q=815011301080222181506122815080025141102202911201=; $[=1;my@a=(q,a,..q,u,,q, ,); $_.=$a[join'',chop$japh,chop$japh]while length$japh; print;
++
Here's some helpful pointers:
(My example and golf are at the end)


If you change "while length$japh" into simply "while$japh", you'll save yourself 7 characters and the length function (slightly speeding it up and making it smaller).

You can also free things up a tad by replacing "$japh" with "$_". This will allow you to change the "chop$japh" into just plain "chop" (or if you want to be strict, "chop()"). And it will also allow you to shorten that "while" even more, by making it "while$_". Oh yah, it also does away with the "my" declaration (saving 2 characters).

Now if you want to go a step further, you can change "@a" into "@_". This does away with the "my" declaration, and confuses some by having two "$_"'s. One is an array and another is a variable, so you don't have to worry about a conflict.

See the "$_.="? That's an unnecessary concatenation if your just returning it directly. So why not just make it a straight "print". (It will slow things down a bit due to the fact that print is called a number of times, but it shortens the overall length).

Rather than "join"ing with a null value, why not just concatenate the "chop"s? "join'',chop(),chop()" eq "chop().chop()". (And it's faster too).

I'll do some more digging after this example, solely for personal gratification 8^) ...

Let's see this so far:

$_=q=815011301080222181506122815080025141102202911201=; $[=1; @_=(q,a,..q,u,,q, ,); print$_[chop().chop()]while$_

This gives the same output as the original.

Now for some inno golfing...

$_=unpack'w*','Ÿ¢ŽÞ»Ðªè„Ž¦åŠ™ÿÜ½Æ…ŽŽËr' if@_=('a'..'u',' ');print$_[chop().chop()] while$_
If that won't work for you, set "$_" equal to '714001200070121171405112714070914131001291810290' rather than using the unpack function.

Cheers,

-inno

In reply to Re: First JAPH by innominate
in thread (joshua) First JAPH by joshua

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.