View Single Post
Old 11-18-2011, 03:31 AM   PM User | #20
FishMonger
Super Moderator


 
Join Date: May 2005
Location: Southern tip of Silicon Valley
Posts: 2,753
Thanks: 2
Thanked 149 Times in 144 Posts
FishMonger will become famous soon enoughFishMonger will become famous soon enough
Once you load the "license" file into the hash, you would add a new key (which is the hostname of the laptop) and its value is taken/extracted from one of the values of the anonymous array of the "unassigned" key.

For example:
Code:
$licenses{ $ENV{'COMPUTERNAME'} } = shift @{ $licenses{ 'UNASSIGNED' } };
After that, you rewrite the "license" file with the data in the %licenses hash.

Last edited by FishMonger; 11-18-2011 at 03:36 AM..
FishMonger is offline   Reply With Quote