in reply to Re(2): (Ovid): uninitialized value in concatenation
in thread uninitialized value in concatenation
what is the undef do inside themy $name = undef; # store subparent for each parent my %parent_hash = ( 'Father' => 'Mother', 'Mother' => 'Father' ); if (exists $parent_hash{$parent}) { my $sub_parent = $parent_hash{$parent}; for my $col ( $parent, $sub_parent ) { my $sql = "select $col from Roster where User=?"; my $rv = $dbh->selectcol_arrayref( $sql, undef, $user ); if ( @$rv ) { # any rows returned? $name = $rv->[0]; # take first one last; } } } # here, $name will be defined if one of above succeeded
my $rv = $dbh->selectcol_arrayref( $sql, undef, $user );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re(4): (Ovid): uninitialized value in concatenation
by dmmiller2k (Chaplain) on Jan 15, 2002 at 20:00 UTC | |
|
Re(4): (Ovid): uninitialized value in concatenation
by dmmiller2k (Chaplain) on Jan 15, 2002 at 20:01 UTC |