6.11. Open files in the old wayIn old version of perl (before 5.6) we could not use scalar variabsles as file Example 6-10. examples/files/open_file_old.pl #!/usr/bin/perl use strict; use warnings; my $filename = "data.txt"; open(FH, $filename); my $line = <FH>; close FH; open(FH, ">$filename"); print FH "data"; close FH; Security problems.
|
Follow me: