Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-10-22 07:25 GMTServer Error (Error ID 8359050c38790)

An error has occurred. The site administrators have been notified of the problem and will likely soon fix it. We thank you, for you're patients.

Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (272 votes). Check out past polls.

    Notices?