Joseph, Let me try and explain. i have a perl script place_order which takes arguments as below:
1. ./place_order -t /thus/axioss/serviceID:123 /thus/axioss/supplierProduct:TestStream 500 /thus/axioss/web/installationTelephoneNumber:112237111663 etc 2. I have a source as a hash of key value pairs as in : /thus/axioss/serviceID:123 /thus/axioss/supplierProduct:TestStream 500 /thus/axioss/web/installationTelephoneNumber:112237111663 3. All I need to do is call the script in 1. and pass these values..Pls note that what i have in 2. is not a file. Its a message structure with each line as key value pairs. 4. I dont have a control of either the target script i.e place_order or the source as in 2. 5.My code needs to pick up this key valuse and invoke the target script. Thanks for u r time. ---------------------------------------------------------------------------- ---------------- regards, Ajitpal Singh, -----Original Message----- From: R. Joseph Newton [mailto:[EMAIL PROTECTED] Sent: 13 February 2004 23:56 To: Singh, Ajit p Cc: 'Rob Dixon'; [EMAIL PROTECTED] Subject: Re: help on picking up key & values "Singh, Ajit p" wrote: > Thanks Rob for your reply... > > My problem is :the values i pick up from is actually not a file.(Sorry about > that) > > The values are stored as an array of structs as key value pairs i.e > /thus/axioss/serviceID:123456 > /thus/axioss/supplierProduct:Test Stream 100 > /thus/axioss/web/installationTelephoneNumber:020837111663 > > I hope i am being clear now. Not really. An array of structs has no meaning in Perl directly, AFAIK. Perl doesn't use structs. How are these values stored? How do you get them into Perl. Where do you get the values when you discuss them? Please, instead of describing this in terms of programming structures, tell us what you actually have to work with coming in, and what you hope to get out of it. What does each identifier mean, and where does the string come from? It could be that having a data file with these keys and values stored in it would be a good idea. But what are they? The coding part will probably come very simply if you can answer this question clearly. Using technical language incorrectly will not get you closer to your goal Keep it as simple as possible. Describe real-world situations in plain language first. This can then serve as a valuable guide to come back to when code and coding structures get mixed up. It's what we call the reality check or sanity test. Once your description makes sense in plain language, the coding part generally is relatively straightforward. I think your problem could be resolved quite simply, if you can refrain from injecting complication into it. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>