in reply to Re^2: How to save the output result in file
in thread How to save the output result in file

You need to add a variable for the filehandle:

my $filename = "/home/Ram/Desktop/Perl_file.txt"; open(my $filehandle, '>', $filename) or die "Could not open file $file +name\n"; print $filehandle @array_a ; close $filehandle; print "done\n";