Since you own the directory, you can delete the files regardless of who owns them. That's how Unix works. The directory is just a special file, and if you have rw access to the directory, you can make the links go away.
If you want to edit the contents of a file created by the webserver, do this:
cp original newfile
vi newfile
rm original
mv newfile original
chmod a+rw original
Now the original file has been replaced by one that you own, with global rw permissions. Not particularly secure, but the server can write to it.
I know of no differences between the permissions behaviors of PHP and Perl. The uid and gid of the Web server determine that behavior.