#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Mainz, RP, Germany
    Posts
    5
    Rep Power
    0
    Okay, following a part out of my script. The lines with the "*" are printed correctly by Perl. The rest isn't. While I can understood why it's not printing the stuff in the "until" loop I have NO clue why it doesn't print the last 4 lines...


    * print '<hr>',"n";
    * print '<table border="0" width="100%" cellspacing="5" cellpadding="0">', "n";
    $l = $page * 10;
    $j = $l + 10;
    until ($l>=$j | | $single[$l] eq "") #start writing entries
    {
    @entry = split(/!--!/,$single[$l++]);
    $i = 0;
    print ' <tr>',"n";
    print ' <td width="100%" bgcolor="',$bgtable,'"><table border="0" width="100%" cellspacing="0" cellpadding="0">', "n";
    print ' <tr>',"n";
    $entry[$i] =~ s/n//; #remove n switch from next entry. (Cosmetic change, this let's the souce code of the page look better)
    print ' <td width="33%" bgcolor="',$bghead,'"><small><font face="',$textfont,'">', $entry[$i++]; #write first entry, $i++ first reports original value and then increases itself by 1
    $entry[$i] =~ s/n//;
    print $entry[$i++], '</small></font></td>', "n";
    $entry[$i] =~ s/n//;
    print ' <td width="33%" bgcolor="',$bghead,'"><small><font face="',$textfont,'">E-Mail: <a href="mailto:', $entry[$i], '">', $entry[$i++], '</a></small></font></td>', "n";
    $entry[$i] =~ s/n//;
    print ' <td width="34%" bgcolor="',$bghead,'"><small><font face="',$textfont,'">Homepage: <a href="', $entry[$i], '">',$entry[$i++], '</a></small></font></td>', "n";
    print ' </tr>', "n";
    print ' </table>', "n";
    print ' <font face="',$textfont,'"><p>';
    until ($entry[$i] eq "eoen") #write actual text entry, until eoe is encountered
    {
    print $entry[$i];
    print '<br>';
    $i++;
    }
    $i++; #increase counter so that "eoe" is not used in next entry
    print ' </font></td>', "n";
    print ' </tr>', "n";
    }
    * print '<tr><td><small><font face="',$textfont,'"><p align="center">',"n";
    print '(<a href="',$cgi,'?page=',&page - 1,'">last page</a> | <a href="',$cgi,'">home</a> | <a href="',$cgi,'?page=',&page + 1,'">next page</a> )<br>',"n";
    print '<a href="',$styleloc,'">Administrator Page</a><br>',"n";
    print '(This Guestbook was created by <a href="mailto:forceflow@gmx.net">Forceflow</a> )</font></small>',"n";
    print '</tr></table></font></body></html>',"n";

    I even cpoied the whole darn thing out of my script and simply let it run, same thing. It won't print the last few lines...

    [This message has been edited by Chriss (edited May 06, 2000).]
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Seems pretty messy. Well, I haven't read thru your script, but as you mentioned about the last few lines, I found a </td> missing.

    print '</tr></table></font></body></html>',"n";

    change it to: print '</td></tr></table></font></body></html>',"n";

  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Mainz, RP, Germany
    Posts
    5
    Rep Power
    0
    Well, I found the problem. I accidently used a "&" instead of a "$" in the fisrt line that wasn't rpinted.

    While we're at it. Does anybody know a good way to test your scripts? I can only test them under DOS, which isn't working very well...

IMN logo majestic logo threadwatch logo seochat tools logo