R
Raistlin Majere
Jesus Christ! I am trying to solve a problem for a day (I will tell my
progress by the end)...
It must be:
AEIM
BFJN
CGKO
DHLP
It must not be:
ABCD
EFGH
IJKL
MNOP
How can links be added in alphabetic order down instead of up in a
table that has 4 cols for every row, 11 rows and 47 links?
#!C:\Programas\xampplite\perl\bin\perl.exe
print "Content-type: text/html\n\n";
open(OLDLIST, "<link list.tmp1");
open(NEWLIST, ">link list.tmp2");
$count=1;
$col=0;
$row=0;
$place=1;
@newlist=();
foreach $line(<OLDLIST>)
{
$col=$count / 4;
$row=$count % 4;
$place=$col * 4 + $row;
$newlist[$place]=$line;
$count++;
};
print NEWLIST @newlist;
close(NEWLIST);
close(OLDLIST);
progress by the end)...
It must be:
AEIM
BFJN
CGKO
DHLP
It must not be:
ABCD
EFGH
IJKL
MNOP
How can links be added in alphabetic order down instead of up in a
table that has 4 cols for every row, 11 rows and 47 links?
#!C:\Programas\xampplite\perl\bin\perl.exe
print "Content-type: text/html\n\n";
open(OLDLIST, "<link list.tmp1");
open(NEWLIST, ">link list.tmp2");
$count=1;
$col=0;
$row=0;
$place=1;
@newlist=();
foreach $line(<OLDLIST>)
{
$col=$count / 4;
$row=$count % 4;
$place=$col * 4 + $row;
$newlist[$place]=$line;
$count++;
};
print NEWLIST @newlist;
close(NEWLIST);
close(OLDLIST);