Why won't my script terminate?

From: Laurie Vien (LaurieF_at_benjerry.com)
Date: 03/24/04


To: "'dbi-users@perl.org'" <dbi-users@perl.org>
Date: Wed, 24 Mar 2004 14:44:29 -0500

I am running a very simple Perl script using DBI (skeleton of it follows).
It does everything I expect it to, but the problem is it doesn't finish
until I Ctrl-C, at which time I get the message "Terminating on signal
SIGINT(2)". What have I left out or done in the wrong order that causes it
not to terminate?:

#MyPerlScript.pl
use DBI;
use Date::Manip;

$dbh = DBI->connect($DB_CONN, $DB_USER, $DB_PASS) || die "Can't connect:
$dbi::errstr";
open(STDOUT, ">>myfile.txt") or die "\nCould not open STDOUT: $!";

$sth = $dbh->prepare("SELECT * FROM MyTable");
$sth->execute();

# < Do bunches of stuff here ....>
#
#

$sth->finish();
$dbh->disconnect();
close(STDOUT);

Laurie



Relevant Pages

  • Re: Why wont my script terminate?
    ... HTH. ... Hardy Merrill ... I am running a very simple Perl script using DBI (skeleton of it ... at which time I get the message "Terminating on signal ...
    (perl.dbi.users)
  • Re: Why wont my script terminate?
    ... HTH. ... Hardy Merrill ... I am running a very simple Perl script using DBI (skeleton of it ... at which time I get the message "Terminating on signal ...
    (perl.dbi.users)
  • (Fwd) RE: DBI with ORACLE encryption
    ... Subject: DBI with ORACLE encryption ... perl script to pull data out of the interface and dump the same to the ... All we do with oracle is to take an database connection ...
    (perl.dbi.users)
  • RE: Unable to connect to Oracle on another Unix host in a perl programming using DBI
    ... This is not a DBI issue. ... To those who could help me with a problem connecting to an Oracle database on HP-UX from within a perl script that uses DBI ... In the program I am trying to connect to another unix hostrunning Oracle 8.1.7 holding a table c1dwg. ... The perl script that runs on host A contains these lines. ...
    (perl.dbi.users)
  • Re: Problem with fetching LONGs and LONG RAWs (ORA-01062)
    ... This perl script illustrates a strange problem while fetching ... LONGs and LONG RAWs. ... What is the full version of Oracle? ... What is the version of the DBI? ...
    (comp.databases.oracle.misc)