This is a wierd one. My boss wants "speedometer"-like counters on all of our current web pages (Ack!), so I whipped a this script really quick:

#!/usr/bin/perl -w use strict; use CGI qw/:standard/; # "global" variable declaration ############################### my $countfile = './_countfile'; my $q = CGI->new; my $font = {face => 'Arial', size => 2}; open (OCOUNT, "<$countfile") || die "open died: $!"; my $count = <OCOUNT>; close (OCOUNT); open (NCOUNT, ">$countfile") || die "open died: $!"; my $ncount = ++$count; print NCOUNT $ncount; close (NCOUNT); my @nums = split //, $ncount; print $q->header; print $q->table({-border => 0, -cellpadding => 0, -cellspacing => 0}, Tr( map { td( img {-src => "count${_}.jpg"} ) } @nums, ) );
I have Apache 1.3.3 running locally on my Win32 box, and when tested, this worked fine (from command-line, and web via localhost). So I go and upload this to our server (Cobalt RaQ2 with Cobalt-Redhat and Cobalt-Apache) and run it from the web. It prints a blank page!! WTF! So I telnet in, and run it from the the command-line, and it prints the header and table tags perfectly! At this point I'm about to shoot someone. Can somebody tell me what's going on?? Is it uncompatible code? AHHH!!! It's not giving any errors at all.

__________________________________________________
<moviequote name="The Whole Nine Yards">
Jimmy T: Oz, we're friends, friends do not engage in sexual congress with each others wives.
</moviequote>

mexnix.perlmonk.org


In reply to printing blank page by mexnix

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.