in reply to Re: How to save the output result in file
in thread How to save the output result in file
but it showing error like$filename = "/home/Ram/Desktop/Perl_file.txt"; open(my@array_a = @array[0..5], '>', $filename) or die "Could not open + file '$filename' $!"; print @array_a ; close @array_a; print "done\n";
first five string:abcdef ghi ijklmnop q rstu vwxy Can't use string ("6") as a symbol ref while "strict refs" in use at array.pl line 22 (#1) (F) Only hard references are allowed by "strict refs". Symbolic references are disallowed. See perlref. Uncaught exception from user code: Can't use string ("6") as a symbol ref while "strict refs" in use at array.pl line 22. at array.pl line 22
. Why it showing error? Please let me know
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to save the output result in file
by hdb (Monsignor) on Jan 17, 2014 at 06:52 UTC |