On Wed, 30 Mar 2005 09:57:38 +0200, GR Kumaran wrote: > > 2. I used "use strict", and I get error for the statement > open(IN_FILE1, ">>test_records.txt"); > > Here the error is > Bareword "IN_FILE1" not allowed while "strict subs" in use .... > > But if I remove "use strict", the program works well. So should I > definately do not use "use strict" if the program want to handle I/O > files? >
The line you gave is okay even under "use strict;", so the problem must be in some code before this line. One problem I saw in the past was that a module that was used overloaded the "open" function. To check if this is the case, change your line to: CORE::open(IN_FILE1, ">>test_records.txt"); Oh, and you should definitly "use strict; use warnings;" everywhere, in every script you write!!! -- Offer Kaye -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>