ikkon has asked for the wisdom of the Perl Monks concerning the following question:
I am thinking if the variable is blank I want to delete the row from $some_data, I don't know the syntax to do it, I also Triedmy $some_data =[ ["HP Hardware", "Total Cost"], [$hardware1, $hardwareValue1], [$hardware2, $hardwareValue2], [$hardware3, $hardwareValue3], [$hardware4, $hardwareValue4], [$hardware5, $hardwareValue5], [$hardware6, $hardwareValue6], [$hardware7, $hardwareValue7], [$hardware8, $hardwareValue8], [$hardware9, $hardwareValue9], [$hardware10, $hardwareValue10], [$hardware11, $hardwareValue11], [$hardware12, $hardwareValue12], [$hardware13, $hardwareValue13], [$hardware14, $hardwareValue14], [$hardware15, $hardwareValue15], ]; for (my $i=0; $i< scalar($some_data); $i++) { if ($hardware[$i] eq "") { } }
Any help or suggestions would be helpful, thanks Benmy @tableData = $some_data; for (my $i=0; $i< scalar(@tableData); $i++) { my @row = $tableData[$i]; for ( my $j=0; $j< scalar(@row) ;$j++) { my $cell = $row[$j]; if (($cell eq "") || ($cell eq " ")) { splice(@tableData, @row, @row) } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating a Dynamic Table
by almut (Canon) on Jan 10, 2007 at 17:00 UTC | |
|
Re: Creating a Dynamic Table
by ikkon (Monk) on Jan 10, 2007 at 18:03 UTC | |
|
Re: Creating a Dynamic Table
by bobf (Monsignor) on Jan 11, 2007 at 06:24 UTC | |
by ikkon (Monk) on Jan 12, 2007 at 14:35 UTC |