> -----Original Message----- > From: John [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 29, 2002 1:12 PM > To: [EMAIL PROTECTED] > Cc: Beginners-Cgi@Perl. Org (E-mail) > Subject: Re: help! > > > Doesn't this leave the file open during the while? It might be OK > in this case depending on the size of the file or what is being done, > but if it were doing something intensive on a big file (or if you > needed the data from the file after the while loop), couldn't this > cause problems if something else update the file?
If you need to ensure the file doesn't mutate while you're processing it, you need better protection than just being "real quick" while you suck it into an array. You need to use some kind of locking or other serialization method. > > >a side note: read your text file like this: > > > >open DATA, "bigdawgs.txt"; > > > >while (<DATA>) { > > > > # do something..... > > > >} > > > >close DATA; > > > > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]