This is exactly what I am looking for; it works like a charm. :-D Now, the question is: How did you learn this type of effiecient coding? I have looked for Perl tutorials (I only started using it this summer when I setup my webserver) and all of them are the same old "how do Perl variables work" and such. Perhaps it is a matter of experience... I can at least understand what this code is doing now that I see it, I just have to learn how to write it.

Actually, I do have three questions:
  1. When $dispmode equals 3 (or display:1 and coordinate:1), it doesn't show the coordinates as an ordered pair like I would like it to. How could I fix this?(sub { print "<tr><td>" . join("</td><td>",split /,/, $_[0], 8) . "</td></tr>\n" })
  2. How would I need to change the code if I wanted to add another display option, such as filtering by name?
  3. If you have time, how would you like to review the code I use to get the data from an HTML page and parse it? (would be much appreciated, I know you might have a whole lot of better things to do :) )
Thank you very much for all of your help!

In reply to Re^2: Printing data from a file in various ways by oomwrtu
in thread Printing data from a file in various ways by oomwrtu

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.