in reply to Re^3: Problem printing contents of file
in thread Problem printing contents of file

its giving me a error 500 when i put the whole path. whats the syntax for putting the full path while opening a file to read?
  • Comment on Re^4: Problem printing contents of file

Replies are listed 'Best First'.
Re^5: Problem printing contents of file
by Corion (Patriarch) on Jun 18, 2008 at 08:06 UTC

    Error 500 means that you have an error in your script. Look in the webserver error log to find what the error is. Or run your script from the command line to see Perl output the error message.

      hey.... thanx a bunch! i put the absolute path and it works....:)
Re^5: Problem printing contents of file
by linuxer (Curate) on Jun 18, 2008 at 08:07 UTC

    What messages appeared in the error log?

    500 is an "internal server error" which should be documented in the error log.

    While developping you could use

    use CGI::Carp qw(fatalsToBrowser);

    to see fatal error messages (e.g. die messages) in the resulting error page...