Syntactic Confectionery Delight | |
PerlMonks |
Re: could not open a physical file using hrefby CountZero (Bishop) |
on Sep 21, 2009 at 17:55 UTC ( [id://796587]=note: print w/replies, xml ) | Need Help?? |
It is not because out of laziness or convenience a great many number of URLs bear a close resemblance to the file which is finally served by the web-server, that there is any necessary link between the URL and such file. As a matter of fact, your above CGI-script is most likely not called 'undersite/1.txt' or '1.txt', but rather 'something.pl' or 'something.cgi' or anything else you have your web-server configured to accept as the link to your script. It has been suggested that perhaps you should use the file:// URL-scheme, but beware, this is likely to work only if the file is on the same computer the web-page is being viewed upon. RFC 1738 says as follows about this scheme: 3.10 FILESThe very last sentence is of course the most important. CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In Section
Seekers of Perl Wisdom
|
|