in reply to -e and unlink

To answer your questions:
1. Your understanding of the -e switch is correct. It checks for the existence of a file.
2. According to Programming Perl, 3rd Ed, the unlink function deletes a list of files,
so it does exactly what you think it does.
3. The statement will look for $filename, and delete it if the statement is true.

TStanley
In the end, there can be only one!