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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://255899]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-03-28 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found