1.

Solve : setting var=value from an array element?

Answer»

I've parsed STDIN down to and array whose elements are "name=VALUE" (looks like CGI because it is). I know how to do this in perl but WANT to do it in Linux. Here's what perl does:
$contents{$name} = ${value}
This sets the LITERAL value in name as a variable containing the value value: i.e.; age=30
I want to use array[n]'s name as the variable name and SET it equal to the arrays value element.



Discussion

No Comment Found