The command switch /i accomplishes almost the same thing
I would say it might accomplish something vaguely similar but it doesn't satisfy the main requirement of the OP's script which is to rename the file. Since the content of the original file is not being changed in any way but is only being queried to provide the new filename I don't think that in-place editing using -p is appropriate. All it can do here is write exactly the same content to the same filename, with the possibility of leaving an identical backup file behind as well. Also, as far as I can see the OP is only using -n in the unnecessary system call inside the script to the Perl one-liner; we only see part of the main script from the look of it.