in reply to dynamic scalar names?
Perl has hashes and arrays built in. Either of those can be appropriate, though a hash sounds better now. perldata and perldsc have more information.
This is a common question among beginning programmers. It helped me to realize that variable names were only there for my benefit — the computer doesn't care what the names are. The aggregate data structures exist when you don't or can't know what the names are when you're writing the program. Hashes associate values with names. Arrays store lists. It takes some experience to know when either is appropriate, but once you realize that you don't need to know the actual name of a variable to use it, you'll find programming is much easier.
|
|---|