in reply to Re^2: File handling
in thread File handling

monks
I have to use this in file manipulation like,
open(FILE,"....") or die $!; while(<FILE>) { //Here Change part has to come } close FILE
1)how to open a file like >+ or +<?.
2)how to modify with in this file in while loop
Thanks in advance

Replies are listed 'Best First'.
Re^4: File handling
by blazar (Canon) on May 31, 2007 at 07:48 UTC
    1)how to open a file like >+ or +<?.

    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. You can't usually use either

    Curiously enough I wrote an explicit example yesterday in a thread with almost exactly the same subject as this one...