Example 6-6. examples/files/write_file.pl #!/usr/bin/perl
use strict;
use warnings;
my $filename = "report.txt";
open my $fh, '>', $filename or die "Could not open file '$filename' $!";
print $fh "Report by: Foo Bar\n";
print $fh "-" x 20;
print $fh "\n";
If you are interested in on-site trainings by the author, please
contact me directly.
|