anjaana78 has asked for the wisdom of the Perl Monks concerning the following question:

i have a for loop... example:
for($i=0; $i<=15; $i++) { # i have to create the file with subscript of $i. like file1, file2... }
in the loop each time i have to create a file how do i do that. thanks for your help.

Replies are listed 'Best First'.
Re: How do i dynamicaly create files.
by turumkhan (Novice) on May 16, 2001 at 22:33 UTC
    the following code may help you:
    for($i=0......){ $filename = "file.".$i open (FILE ">>$filename") print FILE 'i am gonna print in this file'; close (FILE); }