in reply to Re: CGI problem help
in thread CGI problem help

I'm still guessing, but most likely your error is in:

Have you tried adding a whole row at a time?
$table->addRow(@field);
Then all you need is the while loop, it replaces the whole for loop.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re: CGI problem help
by sir_com (Acolyte) on Sep 16, 2009 at 15:27 UTC
    Hi CountZero,

    Thanks for your suggestion on this but I have checked that @field=split(/\s+/,$line); is working fine and returning the result as needed.

    Also,there is nothing worng in the for loop. mistakenly I typed 24 while posting it. actually it's 3 (as mentioned that there is 3 cols).

    I have also tried the same loop part in a script and it returns the data for every cell/field. Then I don't understand why I am not getting the smae in table here

    I haven't tried the addrow() function. Let me try that now.

    Thanks again. sir_com
Re^3: CGI problem help
by Anonymous Monk on Sep 16, 2009 at 18:22 UTC
    Hi CountZero,

    Thanks for pointing me to the addRow() function. Now, it's working fine. I too guess that something was going wrong with the for loop.

    Thanks sir_com