in reply to Re: The beauty that is perl.
in thread The beauty that is perl.

5,30 in around 10 seconds:)


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail

Replies are listed 'Best First'.
Re: The beauty that is perl.
by Anonymous Monk on Apr 04, 2004 at 03:03 UTC

    Index starting at 0? Very peculiar, sounds like a program discovered this, not a human brain. Perhaps...???

    $c = -1; while (<DATA>) { ++$c; print $c, ',', index($_, 'l'), "\n" if index($_, 'l') > -1; } __DATA__ 1111111111111111111111111111111111111111 1111111111111111111111111111111111111111 1111111111111111111111111111111111111111 1111111111111111111111111111111111111111 1111111111111111111111111111111111111111 111111111111111111111111111111l111111111 1111111111111111111111111111111111111111 1111111111111111111111111111111111111111 1111111111111111111111111111111111111111 1111111111111111111111111111111111111111 1111111111111111111111111111111111111111 1111111111111111111111111111111111111111

      Nope, I counted manually. The only artificial aid was zooming the page to 400% so I could more easily pick out the flat-top of the l versus the pointed top of the 1.

      Why zero-based: This is a programming site:)


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail

        Highlight the text, you'll find it instantly.

      My brain counts from zero. Comp Sci folks often reprogram themselves this way :) I must say, though, "find the small L" is sneaky and evil, I like it.
      Following a more traditional x,y notation having the origin in the bottom left hand corner, the 'l' can be found at position 30,6. Slurp and reverse the data array.

      $/ = ''; my @lines = reverse split /\n/, <DATA>;