Home > Archive > PERL Beginners > June 2005 > How do you create variable amounts of vaiables
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How do you create variable amounts of vaiables
|
|
| bowenb 2005-06-07, 3:54 pm |
| Based on text with varying amounts of data, I can parse out the information I need, but haven't figured out a way to create variables from text. For instance the text might contain a list of dollar amounts. The number of them isn't constanct but each one will need a variable name. Is that possible, and if yes how?
Thanks,
Bruce | |
| jmillet 2005-06-07, 7:22 pm |
| quote: Originally posted by bowenb
Based on text with varying amounts of data, I can parse out the information I need, but haven't figured out a way to create variables from text. For instance the text might contain a list of dollar amounts. The number of them isn't constanct but each one will need a variable name. Is that possible, and if yes how?
Thanks,
Bruce
You might try using a hash. Each variable will not have its own name, but you can access it with its hash key. | |
| bowenb 2005-06-08, 10:50 am |
| quote: Originally posted by jmillet
You might try using a hash. Each variable will not have its own name, but you can access it with its hash key.
|
|
|
|
|