From:                   "Chris Zampese" <[EMAIL PROTECTED]>
> 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")

Drop the +

>From perldoc -f open :

            You can
            put a "'+'" in front of the "'>'" or "'<'" to indicate that you
            want both read and write access to the file; thus "'+<'" is
            almost always preferred for read/write updates--the "'+>'" 
            mode would clobber the file first.

Jenda


=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
                                        --- me

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

Reply via email to