If it would be easier, I would like to make the variables (made from keyname elements) into constants. Otherwise I could just set them to indexes for the value array. That way, instead of assigning the value array elements to the variables, I could just use the variables to reference the elements in the array. Eg. $value[$k] would be equal to "3".
Lotto. . Lotto wrote: > I am not even sure if this is possible, though it seems like something > Perl would be capable of. I have a C++ program with perl embedded in > it. I want to pass two arrays to perl, one with keynames and the other > with values in it. Once in the perl code, I want to make variables with > name from the keyname array, and then assign values to them from the > array of values. > > Just in case that wasn't clear, let's say I have in the C++ program an > array with the elements "i", "j", and "k" in it, and an array with the > elements "1", "2", and "3" in it. Once I am in the perl code, I want $i > = "1", $j = "2", and $k = "3". > > Is this possible, and if so could someone give me a quick clip of code > for it? > > Thank you much, > Lotto. > . -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]