On 08-May-2000 Jeff Beard wrote:
> Not strange, a memory leak. You've got some bad code. If you have a program 
> that you've been twiddling with recently, that would be the place to start 
> looking.

The thing is, It's been doing this since I started coding on things... 

I just clicked into a few things in read the guide...

Is doing the things below terribly bad?  We're actually doing 90% of the
stuff in embperl, but we ran into problems in scoping when using my (), so we
switched to use vars.

#!/usr/bin/perl -w

# some sample code
use strict;
use MyStuff;
use vars qw ($dbh $foo $bar $sql $sth $rc);

$dbh = dbConnect;

sub something {
        $foo = "somevvar";
        $sth = $dbh->prepare("some sql code");
        $sth->execute();
        $bar = $sth->fetchrow();
        $sth->finish;
}

----------------------------------

package MyStuff;

use strict;
use DBI;

# export dbConnect, etc

sub dbConnect {
        my $dbh = DBI->connect(args,to,dbi);
        return $dbh;
}
1;
# end of MyStuff;
---------------------------

Regards,

Wim Kerkhoff, Software Engineer
NetMaster Networking Solutions
[EMAIL PROTECTED]

Reply via email to