I'm trying to do the following with an expression:
filename=StringJoin[{"myfile", ToString[someNumber],".m"}]; expression >> filename; But mathematica keeps creating a file named "filename", instead of "myfile42.m"
Any idea how can I tell Put to pretty please, use the filename string value, instead of the expression's name?

Putrather than>>andGetrather than<<. $\endgroup$PutandGetform and the problem persisted. The correct solution was the one suggested by @Nasser using Evaluate $\endgroup$Attributes[{Get, Put}]? On my machine it is{{Protected}, {Protected}}. That means these do not have Hold attributes and thereforefilenamewill be evaluated. What exactly did you try? $\endgroup$