View Single Post
Old 11-16-2011, 06:30 PM   PM User | #14
joeDetroit
New Coder

 
Join Date: Nov 2011
Location: Detroit
Posts: 19
Thanks: 2
Thanked 0 Times in 0 Posts
joeDetroit is an unknown quantity at this point
Quote:
Originally Posted by FishMonger View Post
You can obfuscate the license keys in the post. The important factor is knowing the exact format of the line, which you have not made clear.

Are the fields separated by a single space and nothing else?
Yes, the machine name and license are separated with a single space, one machine/license key per line. As these are site licenses, there may be more than one machine assigned the same license key:

Code:
WPDONCND130CJ57 1111-1111-1111-1111
WPDONCND130CJ58 2222-2222-2222-2222
UNASSIGNED 1111-1111-1111-1111
UNASSIGNED 1111-1111-1111-1111
WPDONCND130CJ5C 2222-2222-2222-2222
Quote:
If a hostname appears more than once and/or has multiple license keys, then you should use a hash-of-arrays.
Each hostname is in the file one time, however each key may appear many times.

Quote:
You should be using the 3 arg form of open and a lexical var for the filehandle. The die statement should include what you're trying to open and the reason it failed.
Is there a performance benefit to this? I see the point (especially the 'die' statement), just curious...

Thanks,
joe

Last edited by joeDetroit; 11-16-2011 at 06:33 PM..
joeDetroit is offline   Reply With Quote