I am using Put (>>) to store information that I am obtaining in Mathematica. The problem is that I am putting a several variables. However, if I do the following, it outputs to a file called year rather than my variable.
For example:
year=64;
sortedTally>>year;
This exports to a file named year rather than a file named 64. The documentation notes that expr >> filename is equivalent to expr >> "filename". Is there any way to circumvent this and put to a filename that changes based on the variables? This is similarly reiterated in the documentation file on Operator Input Forms (at the bottom).
In this case you need to use
Put[sortedTally, ToString[year]].