O.k... here is the code that opens the file and declares the variables...
sub a { open(DATA, "<$config{'basepath'}/data.out") || die "Can't open file: $ +!"; @lines = <DATA>; close (DATA); $listings = 0; foreach $temp (@lines){ ($num,$date,$desc) = split(/\|/,$temp); if ($num =~ /^123$/) { print "$desc\n"; $listings = 1;} } if ($listings eq "0") {print "There are no listings for "123" at this +time.\n";} }
The user has a clickable link to see if any '123' listings are in the file..
<A HREF=$ENV{'SCRIPT_NAME'}?action=a>Click for '123' listings</a><br>
Example of return if '123' exists:

Results for '123':

Apple - Click HERE to add to list
Pear  - Click HERE to add to list     
Orange - Click HERE to add to list
Grapefruit - Click HERE to add to list
Banana - Click HERE to add to list

I would like to be able to have a link at the end of each return value that would "build" a list of the ones the user wants..

So if they clicked next to Orange and Grapefruit and they were done searching, they would click a link that would let them print a list that would just have Orange and Grapefruit in it...

Hope this helps...

_______SysAdm

Edit 2001-03-08 by tye


In reply to Re: Re: Generating a "print list" by SysAdm
in thread Generating a "print list" by SysAdm

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.