in reply to Find Ethernet Card Manufacturer
I find myself saying this a lot, but look into Getopt::Long and Pod::Usage for command line scripts. It cleans up a lot of logic for you and using pod is nicer for manpages than comment blocks :)
Also, when a global is also a constant, use constant instead. This makes it easy to maintain your code as you know what is constant and what the script will probably modify.
I see you aren't using LWP. What's wrong with you? You can use LWP::Simple if you don't feel like messing around with user agents and such. Not to mention you'll be able to handle far more errors :)
Also, consider changing this into a module. It seems more useful in that state than a command line script. You could put the mac address database into the __DATA__ section of the module or specify and arg to check a webpage.
Just some thoughts.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Find Ethernet Card Manufacturer
by mvaline (Friar) on Jul 16, 2001 at 23:07 UTC |
In Section
Cool Uses for Perl