TheDauntless
Programmer
Hi,
I'm trying to do something really simple, but it just won't work: How can I create an empty file (fe .txt), and close it without writing anything in it?
I've tried this:
But then it says:
I've tried a lot of other things, like:
But they all give the same result.
What am I doing wrong ??
I'm trying to do something really simple, but it just won't work: How can I create an empty file (fe .txt), and close it without writing anything in it?
I've tried this:
Code:
open(ORDER, ">$name") or die $!;
No such file or directory at C:\Documents and Settings\Jeroen\My Documents\School\IW\Perl\Amazon.pl line 172, <STDIN> line 1.
I've tried a lot of other things, like:
Code:
open(ORDER, "+>", "$name") or die $!;
What am I doing wrong ??