Guru's
 
Can some one pls. point out why my code is not working? I'm trying to create a hash of hashes dynamically ar the runtime with the code below.
 
Thanks
 
while ( <TL> )
{
   chomp();
   $tdata = $dbhs->ct_sql("select o.name , c.name , t.name,c.length
                         from $opt_d..sysobjects o, $opt_d..syscolumns c, $opt_d..systypes t
                         where o.name = \"$_\" and o.uid = 1
                               and o.id = c.id
                               and c.usertype = t.usertype
                         order by c.name"
                        );  ## Get the target columns
 
  if ( defined($errmsg) )         ## Make sure there were no errors in the last sql execution.
  {
   msg_send("$opt_N","AlterRepDef.pl Failed for $opt_d db on $opt_s server" , "Script failed due to errors below.\n$errmsg\n","
$mailto","$pto");
   exit(1);
  }
  $tlen = scalar(@$tdata) ; ## Get # of columns for the target table.
  foreach my $r (@$tdata)
  {
     my ( $ttb , $tcol , $ttyp, $tlen ) = @$r;
     $target_tbl{
                   '$tcol' => { 'ctyp' => '$ttyp' ,
                                        'clen' => '$tlen'
                                      }
                };
     push(@t_table,@$r);
  }
}
 
use Data::Dumper;
Dumper(%target_tbl);

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to