Corion, below is what I see: The code I run:
#!/usr/bin/perl ##!/comptel/ccacp/elink/common/6.3/perl/bin/perl use strict; use warnings; #use diagnostics; use CGI; use CGI::Carp 'fatalsToBrowser'; use Data::Dumper; print Dumper(\%hash); print Dumper($ref); my $sqlfile = '/var/www/cgi-bin/dual.sql'; my $q = new CGI; my $connstr = 'id971934/colecsp@ECSP';; my $msg = qx"sqlplus -s $connstr \@$sqlfile"; print $q->header,$q->start_html, $q->pre($msg),$q->end_html; cat /var/www/cgi-bin/dual.sql select SYSDATE from dual; exit;
********************** This script was working properly & was giving proper results(sysdate). But when I introduced "Data::Dumper", and I try to run it from command line I get below messages
[ccacp@el2310 cgi-bin]$ perl monkey.pl Status: 500 Content-type: text/html <h1>Software error:</h1> <pre>Global symbol &quot;%hash&quot; requires explicit package name at + monkey.pl line 9. Global symbol &quot;$ref&quot; requires explicit package name at monke +y.pl line 10. Execution of monkey.pl aborted due to compilation errors. </pre> <p> For help, please send mail to this site's webmaster, giving this error + message and the time and date of the error. </p> [Fri Mar 18 17:41:22 2016] monkey.pl: Global symbol "%hash" requires e +xplicit package name at monkey.pl line 9. [Fri Mar 18 17:41:22 2016] monkey.pl: Global symbol "$ref" requires ex +plicit package name at monkey.pl line 10. [Fri Mar 18 17:41:22 2016] monkey.pl: Execution of monkey.pl aborted d +ue to compilation errors.
************************** On running from web browser, I see HTTP 500 error with message "the website cant be displayed".

In reply to Re^13: CGI-SQL Query Issue by Anonymous Monk
in thread CGI-SQL Query Issue by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.