well i havent dealt with the parsing yet, but I am having trouble with the sort stuff. The foreach loops work great but the
$len = length( (sort {$a <=> $b } @s)[0]); $lent = length( (sort {$a <=> $b } @r)[0]);
gives weird results:
___________________________________|______________ 1. D midpoint side AB | G 2. F midpoint side AC | G 3. segment ED median | def of median 4. segment BF median | def of median 5. segment AE median | only one line concurrunt with ot +her median 6. N point of concurrency of medians triangle ABC | def of point of + concurrency 7. segment NE / segment AN = 1/2 | median thm 8. point O point of concurrency triangle ABE | def of point of conc +urrency 9. (segment BP / segment PE) * (segment EN / segment NA) * (segment A +D / segment DB) = 1 | cheva 10. segment AD congruent segment DB | def of midpoint 11. m segment AD = m segment DB | docs 10 12. segment AD / segment DB | ? 13. segment AD / segment AD = 1 | sub 11 , 12 14. (segment BP / segment PE) * (1/2) * (1) = 1 | sub 7, 13, 9 15. segment BP / (segment PE * 2) = 1 | multiplication 14 16. segment BP = segment PE * 2 | cross multipy 15 17. segment BP / segment PE = 2/1 | division 16
with errors for every numeric compare, so i changed it to cmp:
$len = length( (sort {$a cmp $b } @s)[0]); $lent = length( (sort {$a cmp $b } @r)[0]);
, but still, same results. And help would be great. The file i am running this on is available in my scratch pad, here scratch pad viewer

In reply to Re: Re: Re: Parsing by smgfc
in thread Parsing tips by smgfc

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.