Hi,

1. I need to read a configuration file of name/value pairs and be able to
retrieve 'values of names'

An eg. format of configuration  file is

DIR=d:\test
ACTION=BUY
ERROR=2345
ACTION=SELL

I want to write a subroutine to retrive the value d:\test with an input
string  'DIR' say

eg.  get_value('DIR') should return d:\test
eg.  get_value('ERROR') should return 2345

2. It sould also check for duplicate 'names' (ie more than one)

eg. get_value('ACTION') should return an error cos the name ACTION appears
more than once in the config file.


Any help would be greatly appreciated.

Kwabena




_____________________________________________________

This transmission has been issued by a member of the HSBC Group 
"HSBC" for the information of the addressee only and should not be 
reproduced and / or distributed to any other person. Each page attached 
hereto must be read in conjunction with any disclaimer which forms part 
of it. Unless otherwise stated, this transmission is neither an offer nor the 
solicitation of an offer to sell or purchase any investment. Its contents are 
based on information obtained from sources believed to be reliable but
HSBC makes no representation and accepts no responsibility or liability as 
to its completeness or accuracy.

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to