i guess you don't have the constants for the mode
parameter defined. that's why it fails using
strict subs. no strict "subs" wont help either,
it just doesn't complain that the functions O_CREATE etc
aren't defined.
so just use Fcntl;
or use Fcntl qw(:DEFAULT :flock);
to pull in the flags your system supports.