A friend asked me to throw something together for him to help him control a roster. The problem is, while what I wrote works on my server, it doesn't work on his. Now here's the real kicker though... when I cleared out one of my old files I'd gave him (old test proggie) that did work, and pasted in the code from my new program, it worked.

I've looked at the code carefuly, and it is identical... I also double checked the chmod and the path to perl, both of those are identical... so the question is... what could make this work with one file, and not with the other?

#!/usr/bin/perl use Storable; #use CGI qw(:standard); use strict; use constant ROSTER => '/storage/roster.dat'; print "Content-Type: text/html; charset=ISO-8859-1\n\n"; #print header; my $data; if(-e ROSTER){ $data = retrieve(ROSTER); } #You can edit here #Note: Do not use the character ~ when editing without contacting some +one with perl experience print qq~<html> <head> <title>Moonglow Town Council of Atlantic - a Guild, Organization, and +People</title> <style type="text/css"> BODY{ scrollbar-base-color:#39428D; scrollbar-track-color:#39428D; scrollbar-arrow-color:#FFFFFF; scrollbar-highlight-color:#262659; } </style> </head> <body bgcolor=black link=white alink=white vlink=white text=white back +ground="http://www.greypawn.com/MTC/images/content_02.jpg" bgproperti +es=fixed> <font face=Arial size=2 color=white> <span style="font-size:12pt;filter:Shadow(color=#000000,direction=135) +;padding:5;width:100%;"> <h2>Member Roster</h2> <font color=white size=2 face=Verdana><b> <br> <center> <table cellspacing=0 cellpadding=0 border=0 width=500> <tr> <td><font face=Arial size=2 color=white><b><div align=left>Na +me:</td> <td><font face=Arial size=2 color=white><b><div align=left>Ti +tle:</td> <td><font face=Arial size=2 color=white><b><div align=left>IC +Q:</td> </tr>~; #NO MORE EDITING WITHOUT SUPERVISION #Data format: # Hash of names # - icq # - title if($data){ my @list = sort({ $a cmp $b } keys(%{ $data })); foreach my $name (@list){ my $icq = $data->{$name}{'icq'}; my $title = $data->{$name}{'title'}; print qq~ <tr> <td><font face=Arial size=2 color=white><b><div align=left>$n +ame</td> <td><font face=Arial size=2 color=white><b><div align=left>$t +itle</td> <td><font face=Arial size=2 color=white><b><div align=left>$i +cq</td> </tr>~; } }else{ print qq~<tr><td align="middle"><font face="Arial" size=3 color=red +><b>Error: Unable to scan required data!</b></font></td></tr>~; } print qq~</table> </center> <br><br> </font> </span> </body> </html>~;

Note: I realize this code is highly unprofessional, I literally threw it together since I wanted this project done quickly... It is *not* up to my usual requirements. The HTML is also not my fault as it was copy-pasted from a template my friend had.

If you think I overlooked anything, feel free to ask.





My code doesn't have bugs, it just develops random features.

Flame ~ Lead Programmer: GMS | GMS


In reply to Identical files, only one works? by Flame

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.