in reply to Writing to files
open FILE, ">>data" or die "can't append to data: $!"; print FILE "NEW RECORD\n"; close FILE; # now, to store the file's contents in an array, MOST # RECENT DATA FIRST, use unshift instead of push! open FILE, "data" or die "you know the drill... $!"; unshift @contents, $_ while <FILE>; close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Writing to files
by turnstep (Parson) on Apr 08, 2000 at 07:23 UTC | |
by btrott (Parson) on Apr 08, 2000 at 08:34 UTC | |
by japhy (Canon) on Apr 09, 2000 at 00:11 UTC |