Hi everyone,
I thought that the folowing code should save the data to the file, and then when
it was run again it should save the new data on a newline in the same file. It saved
the data once, but it will not repeat the feat. The data comes from a form, and I use
it to generate an email (which works)
I expected the file to look like this...
Placing_Slip_123_456_SOMECOMPANY+09-02-2002
Placing_Slip_890_777_SOMEOTHERCOMPANY+09-02-2002
etc, but I only get the first line.
#!C:\Perl\bin\perl.exe -w
#By Chris Zampese
#use strict;
use CGI ':standard';
use Net::SMTP;
use LWP::Simple;
# some code here that gets stuff from form and creates an email using NET::SMTP
open(MYFILE, "+>> C:/sentslips/sentslips.txt")
|| die "can't open C:/sentslips/sentslips.txt";
print {MYFILE} "Placing_Slip_";
print {MYFILE} $clientno;
print {MYFILE} "_";
print {MYFILE} $policyno;
print {MYFILE} "_";
print {MYFILE} $underwriter;
print {MYFILE} "+";
print {MYFILE} $dates;
print {MYFILE} "\n";
close (MYFILE);
Thanks once again,
Chris.