in reply to Re^2: Avoiding duplicate filenames
in thread Avoiding duplicate filenames

Correct. My memory is faulty, but I think Perl 5.x was available at that time. At least the syntax to call a sub was not &sub.

In any event, this is 2018 and this is the wrong syntax.

UPDATE: Also I do highly recommend "Consider some kind of DB validation process." There are many ways that a filename stored in the DB can go "wrong".