in reply to Re: Exists with DBM
in thread Exists with DBM

Good, you have identitfied a case that works and one that doesn't (i.e. CLI and browser). Now just narrow down the problems.
Ask yourself:

  • What am I doing to get it to display on the browser?
  • What does a '500 Server Error' mean (that was your error? wasn't it?).
  • Then you should search your resources for those answers

    I see a couple of problems:

  • You're doing your headers in a manner that could be incorrect or at least inconsistiant.
    print "Content-type: html/text"; print <<END_OF_BLOCK; <HTML>
    This is highly dependant on how your editor does line endings. use  print "Content-type: html/text\n\n"; even better use that CGI module that you loaded  print $q->header();
  • You are printing several things before you print your headers
  • Both of these things will cause a '500 Server Error'. Whenever you see a 500 error, you should check your log file. The log file will generally point you in the right direction

    2 excellent resources for your CGI programming quests:
    tachyon's CGI Help Guide
    Ovid's Ovid's Web Programming with Perl

    grep
    Unix - where you can thrown the manual on the keyboard and get a command