develooper Front page | perl.beginners | Postings from March 2002

Good God. I'm going to pull my hair out.

Thread Next
From:
Derrick Wippler
Date:
March 6, 2002 08:06
Subject:
Good God. I'm going to pull my hair out.
Message ID:
5.1.0.14.2.20020306110317.02101830@lsi.logicalsi.com
Can anyone tell me why " print $rec->[4] " prints
but print "$recs[0]->[4] does not print a thing ?

I've confimed the data, the first row in the fourth column is an "F"
$rec->[4] prints it, but $recs[0]->[4] does not !!!!!!! ARG !!!!@#@!#!!!@@!!@!!
PS: I'm using DBI, my DBI object is $db

    my @recs;
     my $sql = shift;
     my $st = $db->prepare($sql);
     my $rc = $st->execute(@_);
     my $rec;

     while ($rec = $st->fetchrow_arrayref)
     {
         print @$rec,"\n";
         print "|$rec->[4]|\n";
         push @recs, $rec;
     }

     $st->finish;
    print " Ref: $recs->[0][4]\n";


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About