http://www.perlmonks.org?node_id=64261


in reply to framechat

On Solaris 2.5/Apache I got a few troubles. One, ENV{TEMP} wasn't defined, so I did:
my $temp = $ENV{TEMP} || "/tmp"; ... # so then my $today = "$temp/$yr$mo$mday.txt"; my $normfile = "$temp/.norm"; my $cookies = "$temp/.cookies";
I also was getting a few 100 uninit errors so I:
if($i{sexisgood} and $i{'sexisgood'}=~/submit/){&msgsend()} if($i{op} and $i{'op'}=~/message/){&sendit($i{'message'})} if ( $i{n} ) { if($i{'n'}=~/norm/){&norm()} if($i{'n'}=~/self/){&self()} } print header; if ( $i{n} ) { if($i{'n'}=~/hist/){&history()} if($i{'n'}=~/users/){&users()} ... if($i{'n'}=~/help/){&help()} } else { # if $i{n} #unless($i{'n'} ){ print<<HTML; <title>framechat</title> <frameset cols="*,20%" border="$fborder"> ... </frameset> </frameset> HTML } # if ${n} exit
and finally, all my chat/msgs were showing up as arrar refs so I followed all the makelinks calls:
&makelinks($message->{'content'}); if ( ref($content) eq "ARRAY" ) { $content = join("", @{$content}); }
to get back text. I think:
my $content = &makelinks($message->{'content'});
would be a little nicer than the global $content, unless you need to get at it elsewhere. Finally, and, this isn't probably your doing, but all my boxes (behind the black) say:
Can't use string ("<CHATTER><INFO site="http://perl") as a symbol ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/5.005/i86pc-solaris/XML/Parser/Expat.pm + line 451.
I fear my xml isn't up to date. Pretty cool stuff, and well worth all that testing, though I loan you, heck give you the 50 or so extra spaces to use after 'my' ;-> Thanks for the code!

a