in reply to working with files
Without checking the return values of your open statements, can you be sure the files are actually being opened?
open( IN, '<', 'test.txt' ) or die "Couldn't open infile.\n$!"; open( OUT, '>', 'test.out' ) or die "Couldn't open outfile.\n$!";
You can also check to see that you're actually getting the results you want after the substitution by adding a print statement (for debugging purposes only) as follows:
# after your substitution... print $_; print OUT $_;
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: working with files
by texuser74 (Monk) on Nov 02, 2005 at 09:04 UTC | |
by davido (Cardinal) on Nov 02, 2005 at 09:14 UTC |