$cols = 4;
$num  = @ARGV;

    print "<html>\n<head><title>Skin previews</title><body>\n";
    print "<h1>Skin previews</h1>\n";
    print '<table border="1" cellpadding="0" cellspacing="0">', "\n";
    $width = 100/$cols;
    $i     = 0;
    while ( $i < $num ) {
        print "<tr>\n";
        $j = 0;
        while ( $j < $cols and $i < $num ) {
            $iString = $ARGV[$i];
            print "<td width=$width%><p><img src=\"images/$iString.jpg\"></p>";
            print "$iString";
            print "</td>\n";
            $j++;
            $i++;
        }
        print "</tr>\n";
    }
    print "</table></body></html>\n";

