SunQuest
           Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old May 6th, 2000, 07:47 AM
Chriss Chriss is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Location: Mainz, RP, Germany
Posts: 5 Chriss User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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).]

Reply With Quote
  #2  
Old May 6th, 2000, 08:26 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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";


Reply With Quote
  #3  
Old May 6th, 2000, 09:30 AM
Chriss Chriss is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Location: Mainz, RP, Germany
Posts: 5 Chriss User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Perl stops print in the middle of document...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway