Re: append a file to another file - copy

2001-06-01 Thread Chas Owens
The difference is his boss feels (emphasis on feels) safer. On 01 Jun 2001 17:39:31 -0400, KeN ClarK wrote: > So anycrack could write to it prior to it being 'moved' right? And then > you have non-world-writeable data under the premise it is untampered. > What's the difference? > > Ken > > On F

Re: append a file to another file - delete

2001-06-01 Thread Paul
--- Nichole Bialczyk <[EMAIL PROTECTED]> wrote: > so how do i delete the lines that i read in? (keeping the first one > so that the file still exists) In the code segment I posted below, the first thig I do after openeing the file is read a line from it -- which I do nothing with, so it gets thr

Re: append a file to another file - delete

2001-06-01 Thread Chas Owens
I can think of two ways: if your system implements truncate you can say: open IN, $file or die "$file:$!"; $temp = ;# don't throw away first line; print ; # print the rest of the file. truncate IN, length($temp); # only keep the first length($temp) bytes or the

RE: append a file to another file - delete

2001-06-01 Thread Mitchell, Ian
mation Systems David Thompson Health Region > -Original Message- > From: Nichole Bialczyk [mailto:[EMAIL PROTECTED]] > Sent: June 1, 2001 3:17 PM > To: [EMAIL PROTECTED] > Subject: Re: append a file to another file - delete > > > so how do i delete the li

Re: append a file to another file - delete

2001-06-01 Thread Nichole Bialczyk
oh, thank you so much! i was really getting down to the wire here. On Fri, Jun 01, 2001 at 09:30:01PM -0400, Chas Owens wrote: > I can think of two ways: > > if your system implements truncate you can say: > > open IN, $file or die "$file:$!"; > $temp = ;# don't throw away first line;

Re: append a file to another file - copy

2001-06-01 Thread Nichole Bialczyk
apparently it makes him feel better about it knowing that there is only a 24 hour period that it could be tampered with. i can't imagine anyone *wanting* to tamper with our data, but apparently there is a lot of rivalry in the university system and he wants to limit what they have access to.

Re: append a file to another file - delete

2001-06-01 Thread Bill Stilwell
On Fri, Jun 01, 2001 at 02:39:31PM -0700, Bill Stilwell wrote: How embarrasing. My first post and I left out a semi-colon. It's there now. > my $new_file; > open IN, $file or die "$file: $!\n"; > while () { > if ($. == 1) { > $new_file = $_; > } else { > # your processing goes he

Re: append a file to another file - delete

2001-06-01 Thread Bill Stilwell
On Fri, Jun 01, 2001 at 04:17:06PM -0500, Nichole Bialczyk wrote: > so how do i delete the lines that i read in? (keeping the first one so > that the file still exists) > > On Fri, Jun 01, 2001 at 02:08:25PM -0700, Paul wrote: > > > > --- Nichole Bialczyk <[EMAIL PROTECTED]> wrote: > > > to be

Re: append a file to another file - copy

2001-06-01 Thread KeN ClarK
So anycrack could write to it prior to it being 'moved' right? And then you have non-world-writeable data under the premise it is untampered. What's the difference? Ken On Fri, 1 Jun 2001, Nichole Bialczyk wrote: > well, so the copy didn't work. it required me to place 'use File::Copy;' > in my

Re: append a file to another file - delete

2001-06-01 Thread Nichole Bialczyk
so how do i delete the lines that i read in? (keeping the first one so that the file still exists) On Fri, Jun 01, 2001 at 02:08:25PM -0700, Paul wrote: > > --- Nichole Bialczyk <[EMAIL PROTECTED]> wrote: > > to be more specific, i want to do this: read and delete all of the > > lines from a l

Re: append a file to another file - copy

2001-06-01 Thread Paul
--- Nichole Bialczyk <[EMAIL PROTECTED]> wrote: > to be more specific, i want to do this: read and delete all of the > lines from a log file, except for the first one. open IN, $file or die "$file:$!"; ;# throw away first line; print ; # print the rest of the file.

Re: append a file to another file - copy

2001-06-01 Thread Nichole Bialczyk
well, so the copy didn't work. it required me to place 'use File::Copy;' in my script, but i got an error message. to be more specific, i want to do this: read and delete all of the lines from a log file, except for the first one. i keep thinking grep, but isn't that only a unix command? and

Re: append a file to another file

2001-06-01 Thread Paul
--- Nichole Bialczyk <[EMAIL PROTECTED]> wrote: > i understand how to open and create files, but let's say that i want > to open several files and insert them all into one large file. how > would i do that? At the simplest level, let's assume you have the filenames in an array named @files, and

Re: append a file to another file

2001-06-01 Thread Carl Rogers
Hi Use the ">>" file operator i.e.: open (OUTPUT, ">>filename.txt") or die; $dir = "##enter the directory path here"; opendir (DIR, $dir) or die; ## opens the directory you described in the line above @files = readdir (DIR); ## puts the contents of the directory in an array

Re: append a file to another file

2001-06-01 Thread Craig Moynes/Markham/IBM
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>cc: Subject: append a file to another file

Re: append a file to another file - NEVER MIND

2001-06-01 Thread Nichole Bialczyk
i think i found it. copy("file1", "file2"); that was too easy On Fri, Jun 01, 2001 at 02:30:53PM -0500, Nichole Bialczyk wrote: > i understand how to open and create files, but let's say that i want to > open several files and insert them all into one large file. how would i > do that? > > th

Re: append a file to another file

2001-06-01 Thread M.W. Koskamp
- Original Message - From: Nichole Bialczyk <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 01, 2001 9:30 PM Subject: append a file to another file > i understand how to open and create files, but let's say that i want to > open several files and i

append a file to another file

2001-06-01 Thread Nichole Bialczyk
i understand how to open and create files, but let's say that i want to open several files and insert them all into one large file. how would i do that? thanks, nichole