I am no expert on perl like alot of these guys, but heres what I would do. make the access file easier to parse. I would have the entries something like this:
0001:97 Ford Mustang:Red:46000:9990.00 0002:99 Chevy Blazer:Black:19000:17000.00
where this is an actual newline character between each entry. also, not the first field, which you did not have. This is just a number, but basically it needs to be unique for each car, and then the car will have the html file called 0001.html for example that shows its info. I am not sure if you didnt want to have to have a seperate webpage for each car already made or whatever, but this is what I can think of. Then do something like this:
@car_data = `cat data.file`; foreach (@car_data) { @temp_data = ""; # clear this array @temp_data = split(/:/,$_); # split the current line by semi-colin + into the array @temp_data print "<a href="http://yoursite/$car_data[0].html">$car_data[1]</a +>\n"; # prints the link }
so you'd have, for these two examples:
97 Ford Mustang
99 Chevy Blazer
thats all I got. I am sure this advice is subpar, and the experts here will quickly correct me.

Edit by tye, formatting


In reply to RE: Perl question by Anonymous Monk
in thread CGI list of links to record details from flat-file database by Anonymous Monk

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.