This is a discussion on Unique File Names within the Perl forums, part of the Programming Talk category; I am using $filename = "$$" . "$^T" . ".html"; to name my file for my Perl application. ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Yes this would ensure unique file name because in Perl the variable $$ denotes the process id that is used currently. In addition you have also used $^T which denotes current timestamp. So association of both these gives unique process id with current timestamp to filename making the filename as unique.
|
|
|||
|
Sammy I agree that the variables denote current process id and the current timestamp making filename as unique. But there is a small thing here for consideration. The process ids are unique only up to a certain number. After it reaches the maximum number allowed there is possibility of the process id getting repeated again. Also attaching timestamp though makes it unique filename I feel it would give a bad shape to the filename.
|
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| testing of .net aplication | naga_sri | Testing Tutorials | 1 | 02-16-2007 03:27 AM |
| Tutorial on Silk Test | spriya279 | Testing Tutorials | 2 | 02-15-2007 07:31 PM |
| Apple II Csa2 FAQs: Uploading & Downloading, Part 21/25 | rubywand@swbell.net | Tech FAQ | 0 | 05-04-2004 10:01 AM |
| Apple II Csa2 FAQs: Error List, Part 8/25 | rubywand@swbell.net | Tech FAQ | 0 | 05-04-2004 10:01 AM |
| Solaris x86 FAQ 2/2 | Dan Anderson | Tech FAQ | 0 | 04-27-2004 08:24 PM |