Hello gnielson, 

Once you wrote about "Script to convert pipe delimited to comma delimited":
> 
> Would anyone mind sharing a script if they have one on converting pipe
> delimited ascii data files to comma delimited as in:
> 
> from Gary|Gary|Address|City|State
> to   "Gary","Gary","Address","City","State"
> 
> I could use a simple perl command to change every pipe to "," but that
> does not take care of the beginning and ending of each line. Any help,
> advice, pointers appreciated.

Just read the file like this:
open (DATAFILE, "path/to/my/file");
@lines=<DATAFILE>;
close (DATAFILE);

Then work with each line as you planned before ;-)
foreach $line (@lines) {
 ... 
 dosomething_here;
 ...
}

-- 
Best regards,
 Leonid Mamtchenkov
 E-mail: [EMAIL PROTECTED]
 Quote : Often it does seem a pity that Noah and his party did not miss the boat. -- 
Mark Twain


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to