You should also do as perlstyle says and include $user_name.
And personally I would begin sweating at trusting user input for filenames. Have you verified that the name looks like what you think it should? See perlsec for more on that issue.
And btw that code for flocking will not give you the protection you want, open it "+<$user_name" or else it gets wiped out before you try to lock it.
In reply to RE (tilly) 1: Creating a file with Open
by tilly
in thread Creating a file with Open
by Newbie Ed
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |