> sub WriteFile
> {
> my ($file,@lines) = @_;
> my ($line);
>
> open(FILE,">$file");
FILE is a problem.
If you are using perl 5.6 or later, you can do:
my $fh;
and then use $fh where you were using FILE, eg
open($fh, ">$file");
If you aren't using 5.6, it gets more complicated
and I'm out of, er, my depth. I'll post later if I see
what to do, but I suggest you post again and ask.
> foreach $line (@lines)
$line is a problem.
Fixing $line is easy. I'll let you guess. :>
Ok, no I won't:
foreach my $line (@lines)
> {
> print FILE $line; }
> }
> close(FILE);
> return(0);
> }
> open(FILE,">$file");