On Dec 9, 2003, at 8:33 PM, Andrew Gaffney wrote:

John W. Krahn wrote:
Andrew Gaffney wrote:
I am writing a Perl script to automatically generate a netlogon.bat file for Samba
whenever a user logs onto a domain. The only parameter that is passes to it is the
username. My problem is that different groups get some of the same mappings. What I really
need to do is filter out duplicate lines in the finished output.
Whenever you want unique values think "hash".

Well, it would have been weird to have a hash with keys named 'NET USE F: \\\\SKYLINE\\SKYLINEF\r\n'.

Why is this weird? It's a string, hash keys need to be strings. Good fit.


Actually, this is a very common textbook Perl idiom. The sooner you get the hang of tricks like this the better.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to