Mauro wrote: > > Hi all, I have a problem using sysopen function. > This is the code: > #!/usr/bin/perl
Add this line to import the O_RDWR, O_CREAT and O_EXCL constants. use Fcntl; Of course, if you had also included these two lines then perl would have pointed out the problem. use warnings; use strict; > $filename = "BAD_SPARSE_FILE" ; > sysopen(FH, $filename, O_RDWR|O_CREAT|O_EXCL, 0666) or die "Can't open > $filename: $!" ; > close(FH) ; > > And this is the error: > Can't open BAD_SPARSE_FILE: No such file or directory at ./sparse_file line > 3. > > Why do I get this error? > > A file named "BAD_SPARSE_FILE" doesn't exist... John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>