in reply to Parsing a comma delimited file

However it gives me a warning message at the begining
That 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
open(IN, '<c:\doclist.chr') or die "Couldn't open file, $!"; open(OUT, '>c:\doclist.txt') or die "Couldn't open file, $!";
Also can I suggest a simplification to your while loop
print OUT join '|', split /,/ while <IN>;
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!
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: Parsing a comma delimited file
by Skyler99 (Novice) on Feb 13, 2003 at 15:15 UTC
    Thanks for the info ... the program works like a charm!