SillyMonk has asked for the wisdom of the Perl Monks concerning the following question:
The problem is at the moment when you goto the text file it just has the number value stored such as 5,7,29 whatever. I need it to say count=5,7,29 for instance I have tried several different ways of doing this but they all result in an error page, I tried#!/usr/bin/perl print "Content-type: text/html\n\n"; open(flashcount, "/var/www/html/log/flashcount.txt"); $count=<flashcount>; $outcome = $count+1; print $outcome; close(flashcount); open(flashcount,">/var/www/html/log/flashcount.txt"); print flashcount $outcome ; print "</BODY>\n"; print "</HTML>";
I've played about with lots of different ways, just doesnt seem to be working, Any help or advice would be greatly appreciated. Thanks from SillyMonk, Jamesprint flashcount "count="$outcome ; (error) print flashcount "count" $outcome ; (error)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing to a New File
by toolic (Bishop) on Jan 28, 2008 at 20:03 UTC | |
by SillyMonk (Initiate) on Jan 28, 2008 at 20:20 UTC | |
|
Re: Writing to a New File
by almut (Canon) on Jan 28, 2008 at 20:34 UTC | |
by ikegami (Patriarch) on Jan 29, 2008 at 00:58 UTC | |
|
Re: Writing to a New File
by GrandFather (Saint) on Jan 28, 2008 at 21:52 UTC | |
|
Re: Writing to a New File
by bradcathey (Prior) on Jan 28, 2008 at 19:59 UTC | |
by SillyMonk (Initiate) on Jan 28, 2008 at 20:05 UTC |