Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Using smbstatusinfo in scripts

by teabag (Pilgrim)
on Apr 08, 2003 at 15:57 UTC ( [id://248980]=note: print w/replies, xml ) Need Help??


in reply to Using smbstatusinfo in scripts

There is absolutely no reason I'm declaring all those variables up front, I guess. Still learning how to be strict. ;) I've always thought the (linux) grep was a bit faster then the builtin one in perl. But with this script it probably doesn't matter much.
And you're right. Your last code does look a lot nicer. I just went for the quick and dirty code. One correction on your last code though:
use constant INFOFIELDS => (LOGIN, MACHINE, MON, DAY, TIME);
MON should be MONTH. Aside from that it works perfectly.

Teabag.

chmod 666 *.* 'cause everyone should have the right to read and write!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://248980]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-20 04:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found