sysopen fails

From: Mauro (mauo-_at_interfree.it)
Date: 04/28/04


To: beginners@perl.org
Date: Wed, 28 Apr 2004 09:31:07 +0200

Hi all, I have a problem using sysopen function.
This is the code:
#!/usr/bin/perl
$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...

Thank You

Mauro