in reply to Parsing a comma delimited file
However it gives me a warning message at the beginingThat would be the filenames in you open calls. You need to use single quotes instead as the backslash is trying to escape the 'd' following it which is not what you want e.g
Also can I suggest a simplification to your while loopopen(IN, '<c:\doclist.chr') or die "Couldn't open file, $!"; open(OUT, '>c:\doclist.txt') or die "Couldn't open file, $!";
Now you're not limited to seven fields (although you can enforce this using the 3rd argument of split) and you've done it all on a single line, hurrah!print OUT join '|', split /,/ while <IN>;
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Parsing a comma delimited file
by Skyler99 (Novice) on Feb 13, 2003 at 15:15 UTC |