in reply to Using the Variable Name from an Array

I think you are asking how to get strings (such as 'ID', 'Record_Lock', etc) from the array @elements. This is not possible. Any ARRAY contains only a LIST of SCALARS. The name that you use in your source code is not part of the scalar hence it not part of the array. It is possible to create a scalar which contains the name of a variable. This is called a 'symbolic reference'. It is almost always a bad idea (not even allowed under 'use strict'). You need a more appropriate data structure (probably a hash or an array of hashes). We can help you design this structure if you provide us with a small sample of your input data and the expected output from that sample.
Bill
  • Comment on Re: Using the Variable Name from an Array