Hi, I had the same problem and I don't know why, but I have discovered that if I don't use $sth->fetchall_hashref('key') but another method, the script doesn't gives errors anymore.
So I needed to use fetchrow_hashref() for each row instead. Teddy ----- Original Message ----- From: "Ing. Branislav Gerzo" <[EMAIL PROTECTED]> To: <beginners@perl.org> Sent: Tuesday, June 07, 2005 12:31 PM Subject: Attempt to free unreferenced scalar > Hi all, > > I get error: > Attempt to free unreferenced scalar: SV 0x1e166a0, Perl interpreter: 0x3417c at > D:/Perl/lib/Errno.pm line 15. > while running this script, could anybody helps me ? > > use strict; > use warnings; > use DBI; > use WWW::Mechanize; > > my $dbh = DBI->connect("DBI:mysql:database=test;host=localhost;port=3306", "2ge", "", > {RaiseError => 1} ) or die "Can't connect: ", $DBI::errstr; > > my $mech = WWW::Mechanize->new(); > mech->agent_alias('Windows IE 6'); > > my $sth_get_links = qq{ select id, url from links > where follow = 1 > limit 1 > }; > > my $a = $dbh->selectall_hashref($sth_get_links, 'id'); > while ( my($link_id, $value) = each(%$a) ) { > print "getting $value->{url}\n"; > $mech->get( $value->{url} ); > } > $dbh->disconnect; > __END__ > > for me it seems, that DBI and W::M doesn't like each other. > > Thanks for any idea how to fix this > > /brano > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>