Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 meditating upon the Monastery: (15)
As of 2014-07-29 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (220 votes), past polls