P
Peng Yu
Hi,
The commented line would work correctly. But the code below it would
not work correctly. I'm wondering what the problem is?
Thanks,
Peng
#!/usr/bin/perl
use warnings;
use strict;
#use File::Temp qw/ tempfile tempdir /;
#my ($fh, $filename) = tempfile();
#print "$filename\n";
use File::Temp;
my ($fh, $filename) = File::Temp->tempfile();
print "$filename\n";
The commented line would work correctly. But the code below it would
not work correctly. I'm wondering what the problem is?
Thanks,
Peng
#!/usr/bin/perl
use warnings;
use strict;
#use File::Temp qw/ tempfile tempdir /;
#my ($fh, $filename) = tempfile();
#print "$filename\n";
use File::Temp;
my ($fh, $filename) = File::Temp->tempfile();
print "$filename\n";