This is one of those exceptions that proves the rule. This is one of the few cases when I think that the C-style for(;;) has much going for it relative to the (many) other possible approaches.
#! perl -slw use strict; use CGI qw[:standard *table]; my @data = 1 .. 103; print start_table( {-border=>1} ); for( my $i = 0; $i < $#data; $i += 5 ) { print Tr( td( [ map{ defined $_ ? textfield( { -name=>$_, -default=>$_ } ) : ' ' } @data[$i .. $i+4] ] ) ); } print end_table;
Examine what is said, not who speaks.
The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
In reply to Re: How to iterate by fives?
by BrowserUk
in thread How to iterate by fives?
by moof1138
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |