Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

On debugging "Premature End of Script" errors

by merlyn (Sage)
on May 06, 2003 at 14:42 UTC ( #255899=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/bin/sh
    echo content-type: text/plain
    echo
    date
    
  2. or download this
    #!/your/path/to/perl
    print "Content-type: text/plain\n\n";
    print "Hello world at " . localtime() . "\n";
    
  3. or download this
    #!/your/path/to/perl
    BEGIN { print "Content-type: text/plain\n\n--OUTPUT--\n"; }
    ... rest of your script ...
    
  4. or download this
    BEGIN {
      print "Content-type: text/plain\n\n--OUTPUT--\n";
      open STDERR, ">&STDOUT"; # errors go to browser now
    }
    ... rest of your script ...
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://255899]
help
Chatterbox?
[Corion]: Hmm - is anybody aware of a "protocol-only" HTTP module? I'd like to teach Prima non-blocking HTTP ideally without using threads, but that means reimplementing/ rewriting something like HTTP::Tiny (except asynchronous) or AnyEvent::HTTP
[Corion]: Ideally, the HTTP state machine but with a way to feed it HTTP data whenever I get it instead of it actively doing stuff.
[Corion]: Now that I talk about this, maybe Net::Inspect::L7:: HTTP would be the right kind of thing for the responses at least.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2016-12-07 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (128 votes). Check out past polls.