the above code is correct because it run well on my xp system and on the remote web server with no problem. why not on my locl linux box as well? thank you folks!
Dear Gentle Monk,
First off let me comment that one of the tools that I
use all the time when debugging code prior to its
release into production is:
use CGI::Carp qw/ fatalsToBrowser /;
The information that will emit to your browser when
something terrible goes wrong can often save you lots
of aggravation later on.
It should be stressed, however, that you would modify
the CGI::Carp invocation prior to release to
production to remove the qw/ fatalsToBrowser /
line and let fatal errors got to you server's logs
instead.
If you haven't read it already check out CGI Help Guide
as it has some good dope in it as well as far as
troubleshooting errant CGI scripts.
Offhand from what little code you have provided for us to
look at I'd say it was a pathing issue. I am particularly
suspicious of the line:
@files = <../data/texts/*.txt>;
Relative paths can trip you up time and time again.
Peter L. Berghold -- Unix Professional Peter at Berghold dot Net |
| |
Dog trainer, dog agility exhibitor, brewer of
fine Belgian style ales. Happiness is a warm, tired, contented dog curled up at your side and
a good Belgian ale in your chalice. |
|