Welcome to the Monastery | |
PerlMonks |
Re: LWP::UserAgent with development websiteby TheHobbit (Pilgrim) |
on Sep 18, 2004 at 12:32 UTC ( [id://391985]=note: print w/replies, xml ) | Need Help?? |
Hi, Just an idea, but it will not surprise me if it was the good one. The problem could be in using a relative path to get the file. The path is relative to the current working directory of the Apache process handling your request, and this will almost certainly be not what you think it is. Try replacying the relative path with the absolute one. Moreover, using relative paths is almost always a BadThing, exactly because you cannot know what would you get at runtime. Using cat, while strictly possible, may not be advisable. The slurp solution proposed, eg.
are better, but they ask for the interpreter to slurp the whole file before sending it. If the file is relatively small this is not a problem, and the above solution is good, even if this one
is better IMHO. But if the file is big then:
will likely be a better idea. Hoping it wil help. Greetings Leo TheHobbit
In Section
Seekers of Perl Wisdom
|
|