in reply to Print Array into 4 Column Table
splice(). Here's a snippet for you.
use CGI qw( Tr td div font br ); while ( @cities ) { my @row = splice @cities, 0, 4; print join( "", map( Tr( td( { -width => '25%', }, div( { -align => 'center', }, font( { -color => '#2f2cff' }, $_ ) . br() ) ) ), @row ) ); }
|
|---|