character(len=5) :: c write(c,10) [list]
Example: opening files with names file01, file02.m, .., file22.m