I am a total beginner to perl. I wrote the program below to open a program
file, read it line by line, and write each line to an output file after
first putting two string lines out there. It compiles without errors but the
output is a filename with zero length. What did I do wrong? Thank you!


#!/usr/bin/perl -w
use strict;

open (infile, "<<moo.cgi");
open (outfile, ">>snert.cgi");

my @linesin = <infile>;

foreach (@linesin) {

print outfile "output line 1\n";
print outfile "output line 2\n";
print outfile "$_\n";

}

close (infile);
close (outfile);








-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to