[kw-pm] File I/O
kw-pm at datademons.com
Wed Aug 25 08:25:44 PDT 2010
>From perlfunc -f open:
thus '+<' is almost always preferred for read/write updates--the '+>' mode would clobber the file first.
On Wed, 25 Aug 2010, Robert Pike wrote:
> Hey all,
> Wondering what people most commonly use to open, lock, read, update, and write back to a file. I've been looking at using the open function along with +> but cannot seem to read from the filehandle using the following piece of code (just simple test code) :
> open(FH, "+>somepath");
> my @ca = <FH>;
> print join("<br>", @ca); // prints nothing to the screen
> I was wondering what alternatives peopel would give to the above code but also an explanation to why the above code doesn't result in the printing of the contents of the file (to the screen)? Thanks in advance for any insight given.
> kw-pm mailing list
> kw-pm at pm.org
More information about the kw-pm