I would code this as:$hlist->header('create', 0, -text => 'user'); $hlist->header('create', 1, -text => 'gid'); $hlist->header('create', 2, -text => 'pid'); $hlist->header('create', 3, -text => 'machine'); $hlist->header('create', 4, -text => 'service'); $hlist->header('create', 5, -text => 'ip-adres'); $hlist->header('create', 6, -text => 'logon time');
because I hate to repeat things myself that can be repeated by the computer. And I would try to do something similar for the rest of the snippet. And yes, I cheated a little by changing "logon time" to "logon" to make it work with qw(). ;-)my $option = 0; foreach (qw(user gid pid machine service ip-adres logon)) { $hlist->header('create', $option++, -text => $_); }
Liz
In reply to Re: perlTk sample that shows sambastatus
by liz
in thread perlTk sample that shows sambastatus
by teabag
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |