List:General Discussion« Previous MessageNext Message »
From:Douglas Brantz Date:January 27 2002 3:34pm
Subject:Help with Code
View as plain text  
Hello,

Could someone help me with a bit of code to output data from mysql in a
formated way in a text box.
This might not be the list to ask and if not please direct me in the
right direction.  I'm writing in Perl.
Here is a sample of the code.

my @arrinstr=();
my $list="";
while (@arrinstr = $sth4->fetchrow)
{
($sec,$title,$seats)=@arrinstr;
$csec=$sec;
$ctitle=$title;
$cdes=$seats;
$list.="$csec    $ctitle     $cdes  \n";
}
#print "$list";
print $query->textarea
({-name=>'INFO',-default=>$list,-cols=>'75',-rows=>'5'});

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

This works but I would like to format the data in the $list.  so that
things are right justified and lined up.

Thanks in advance.

Douglas
brantzdr@stripped

Thread
Help with CodeDouglas Brantz27 Jan
  • Help with formating data in textareaDouglas Brantz27 Jan