Willman023 has asked for the wisdom of the Perl Monks concerning the following question:
if (-e <$upload_dir/$filename2>) { my $inc; # incrementor for($inc = 1; -e <$upload_dir/$filename2 . "~" . $inc>; $inc++) { # Check for previous incremented filenames } $filename2 = $filename2 . "~" . $inc; }
bW
Perl - the breakfast of Champions!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Overwrite file protection
by sgifford (Prior) on Jun 16, 2003 at 22:17 UTC | |
|
Re: Overwrite file protection
by monsieur_champs (Curate) on Jun 16, 2003 at 20:02 UTC | |
by Willman023 (Scribe) on Jun 16, 2003 at 20:22 UTC | |
by monsieur_champs (Curate) on Jun 16, 2003 at 20:33 UTC | |
by Cody Pendant (Prior) on Jun 16, 2003 at 21:23 UTC | |
by monsieur_champs (Curate) on Jun 17, 2003 at 13:34 UTC | |
|
Re: Overwrite file protection
by benn (Vicar) on Jun 16, 2003 at 20:02 UTC | |
by sauoq (Abbot) on Jun 16, 2003 at 20:43 UTC |