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

how am i to know which current directly are they using?

Your script can make use of the Cwd module for that. (But, as stated elsewhere, the best approach is to use a full path to frame.txt instead of the relative path that you have been using. When you use a full path it doesn't matter where the current working directory is.)

Cheers,
Rob
  • Comment on Re^3: Problem printing contents of file

Replies are listed 'Best First'.
Re^4: Problem printing contents of file
by ketaki (Acolyte) on Jun 18, 2008 at 07:55 UTC
    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?

      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....:)

      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...