in reply to weird print results

This looks like an HTML quoting issue. Properly quote your URL parameters and your problem should be solved.
foreach my $line (@results) { my ($first, $second, $third) = split(/::/, $line); print qq(<b>$first</b> <a href="$second&a='$first'&t='$third'">$thi +rd</a><br>); }

Update: I just removed the strikethrough and comment "Brainfart. Ignore me." that I added right after posting it. I added them because I was ticked off at the response I got in the CB.

Replies are listed 'Best First'.
Re^2: weird print results
by ikegami (Patriarch) on Jul 01, 2006 at 18:08 UTC
    I could stil be a quoting issue. For exmple, spaces are not allowed in URLs. Similarly, the characters <, > and & have special meaning in HTML text, so they need to be escaped too.
    use CGI qw( escapeHTML ); use URI::Escape qw( uri_escape ); foreach my $line (@results) { my ($first, $second, $third) = split(/::/, $line); my $ue_first = uri_escape($first); my $ue_second = uri_escape($second); my $ue_third = uri_escape($third); my $he_first = escapeHTML($first); my $he_third = escapeHTML($third); print qq(<b>$he_first</b> <a href="$ue_second?a=$ue_first&t=$ue_thi +rd">$he_third</a><br>); }

    Alternate syntax:

    use CGI qw( escapeHTML ); use URI::Escape qw( uri_escape ); foreach my $line (@results) { my ($first, $second, $third) = split(/::/, $line); my ($ue_first, $ue_second, $ue_third) = map uri_escape($_), $first, $second, $third; my ($he_first, $he_second, $he_third) = map escapeHTML($_), $first, $second, $third; print qq(<b>$he_first</b> <a href="$ue_second?a=$ue_first&t=$ue_thi +rd">$he_third</a><br>); }

    No need to escape for HTML that which has already been escaped for URIs since URIs can't contain any special HTML characters.

      Thank you a hundred qadbillion! Escaping everything did make everything work 100% of the time.

      Thank you for your help, I really appreciate it!