Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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


In reply to Re: perlTk sample that shows sambastatus by liz
in thread perlTk sample that shows sambastatus by teabag

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-25 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found