Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Perl and XML

by BzBeauty (Sexton)
on Mar 16, 2004 at 23:10 UTC ( [id://337158]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl and XML
in thread Perl and XML

what do you mean by header and blank line?
#!/usr/bin/perl
these things?

Replies are listed 'Best First'.
Re: Re: Re: Perl and XML
by bart (Canon) on Mar 16, 2004 at 23:19 UTC
    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.
        "fatalsToBrowser" will only kick in in case Perl produces an error. In this case, it didn't, forgetting the header and closing off the headers, was completely your own mistake. Perl itself didn't complain, but still, the webserver wasn't happy.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://337158]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-23 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found