in reply to Perl and XML

I'm getting a "500 Internal Server Error" error.
Duh? You're running this as a CGI script? So where do you print out the header(s), and the blank line?

Your syntax is fine, I don't have a sample of your XML file, and thus I'm not convinced that's not all there is to it.

Replies are listed 'Best First'.
Re: Re: Perl and XML
by BzBeauty (Sexton) on Mar 16, 2004 at 23:10 UTC
    what do you mean by header and blank line?
    #!/usr/bin/perl
    these things?
      No, you need that too, and it must be a proper path to perl too, but that's usually called the shebang line.

      No, I'm now talking about CGI 101, you can use a simple

      print "Content-type: text/plain\n\n";
      before your print anything else, or something similar but more advanced from one of the CGI modules.

      For simple experimentation, it'd be best to use something like

      use CGI::Carp 'fatalsToBrowser';
      because then you'll get your Perl error messages in the browser window, too.
        thank you. that fixed it. maybe I should rename myself to CGI<101 so yeah, how do you use the
        use CGI::Carp 'fatalsToBrowser';
        do you need the
        print "Content-type: text/plain\n\n";
        for that to work as well. Cause I stuck the fatalsToBrowser in their first hoping for a decent error message - but no same error. And of course, when I put the header in their, it works, so no error at all.