in reply to Re^3: Declaring and checking content of variables with consecutive names
in thread Declaring and checking content of variables with consecutive names
Thank you very much, I get your point regarding the two-dimensional array.
On a related note, how would you store data to disk into consecutively named files? I would typically use a rootstring (something like $rootStr = 'dataFile' in Perl) and a counter $j, increment the counter in a loop, and print "$rootStr . $j" into a string "$fileNameString". Then I would want to name the file according to the contents of "$fileNameString".
I understand, however, this is strongly discouraged in the Perl community.
What approach would be better to make consecutively named files, using Perl?