http://www.perlmonks.org?node_id=141705

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

The code below works great for me, but I would like to format the output of $list. so that it is lined up correctly in the textarea. Can I use a format command and how would that look?
my @arrinstr=(); my $list=""; while (@arrinstr = $sth4->fetchrow) { ($sec,$title,$seats)=@arrinstr; $csec=$sec; $ctitle=$title; $cdes=$seats; $list.="$csec,$ctitle,$cdes\n"; } print $query->textarea ({-name=>'INFO',-default=>$list,-cols=>'75',-ro +ws=>'5'});
Thanks,
Douglas
brantzdr@appstate.edu

Edited 2002-01-25 by Ovid