Some coding critique (not knowing anything about Tk):
$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');
I would code this as:
my $option = 0;
foreach (qw(user gid pid machine service ip-adres logon)) {
$hlist->header('create', $option++, -text => $_);
}
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(). ;-)
Liz
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.