As long as all applications that manipulate data in this file use Fcntl locking API -- flock(), fcntl(), you'll be OK. Just make sure you're checking return values of all system calls.
If you don't need the file handle after you unlock it, you can simply close() it. Perl flushes the buffers for you before unlocking the file in either case. But you can always do it yourself if you so desire.