Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2014-11-23 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (134 votes), past polls