my row = ""; my $switch; for (0 .. $max-1) { ($href, $text, $function) = split( "\e", $filelist[$_+$j*$max], 3 ); if ($switch) { $row .= qq|; } else { $row .= qq|; } $row .= qq|function - $text; $switch ^= 1; }