http://www.perlmonks.org?node_id=1022723


in reply to Re^2: printing of an array
in thread printing of an array

$filelist = "C:\Users\cign\Desktop\printFile.txt"; my @files = (file1, file2, file3); open(WRITEFILE, ">$filelist") || die("ERROR: unable to open file \n") +; select WRITEFILE; foreach my $file (@files){ print WRITEFILE ; #"$file\n"; } close WRITEFILE;
I tried running above code, but I am getting error message unable to open file. WHats wrong in here, why can this file handle not open ?