in reply to reading a particular line in a large text file

Hi

I ran your code and had the same error. The problem is that you haven't imported the O_RWDR and O_CREAT constants.

Try adding
use Fcntl;
to the top of your script.

also, you probably want
#!/usr/bin/perl
-jim