Hi,

I'm using ActivePerl 5.6.1.  I am trying to update an existing file. 
According to perlfaq5.pod, I should be able to use:

    open(FH, "+< /path/name");          # open for update

However, I this doesn't seem to update the file for me:

#----------(begin)---------#
#! perl -w
$| = 1;
$file = "myFile";
open(FILE, "+< $file") or die "Could not open file, $file: $!\n";
while (<FILE>) {
    # do whatever (read)
    print;                   
}

# write a line to the file
print FILE "\ntest line\n";  
close(FILE);
#----------(end)-----------#

This runs and displays the file, but the added line is missing.  Any ideas
why?!  Thanks in advance.


Jeff

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

Reply via email to