I have been beating my head on what should be a simple problem, appending a
line to a .html file.

#!/usr/bin/perl

use strict;
use warnings;

my $line_to_write="I've appended a line to a file !";
my $file_name="/perl_work/test1.html";

open DAT,">>$file_name";

print DAT "$line_to_write\n";

close DAT;

I get no errors but I do get a new file created with no .html extender just
test1 rather than appending to test1.html. What beginner mistake am I
making?


Reply via email to