|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
My Perl script creates files named after a form input. So if the user entered infomation and his name was fred, his datafile would be called fred.txt
But if another person called fred signs up, the file will be overwritten. Can Perl name a script 'filename1.txt' and increment the 1 each time the name is repeated? Would appreciate any help. Cheers |
|
#2
|
|||
|
|||
|
Just write everything to one line with a delimiter separating each fields and a newline n at the end of each line. On next try, fred's entry would be on the 2nd line.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > How can I increment a filename? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|