in reply to Re^2: XUL::Gui and Loop structure
in thread XUL::Gui and Loop structure
If you want to be more Perlish, drop the @list.
sub build_list { my $max = shift(); return map Label(value=>$_), 0..$max; }
The name $howmany was misleading, you were generating more items than that as you were stargin with zero. And now there's little reason to keep on using a subroutine.
Jenda
Enoch was right!
Enjoy the last years of Rome.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: XUL::Gui and Loop structure
by lancer (Scribe) on May 31, 2011 at 19:40 UTC |