Hi all,
I have a problem when writing text to a new file.
Code:
#!/usr/bin/perl
use strict;
use warnings;
open( my $fh," > output.txt");
print $fh,"this is test1.\n";
print $fh,"this is a test2.\n";
close $fh;
And the output of this script is:
Quote:
GLOB(0x8d52768)this is test1.
GLOB(0x8d52768)this is a test2.
|
And the output.txt file is empty.
I do not know why.