Ok, do you recommend I open the file and create a list of the lines in that file? Example below on how I did the comma seperate list:
open(QUOTE2,"$QuoteFile"); open(NEWQUOTES, ">>newquotes.txt"); while ($line = <QUOTE2>) { $line =~s/\t/,/g; print NEWQUOTES "$line"; } close (NEWQUOTES); close (QUOTE2); On Wed, 2 Jan 2002, Hanson, Robert wrote: > You could do something like this (including the comma delimeter)... > > # a sample record > my $record = "blah1\tblah2\tblah3"; > > # split by tabs > my @fields = split( /\t/, $record ); > > for (my $i = 0; $i < @fields; $i++ ) { > # add 255 spaces to the field > $fields[$i] .= " " x 255; > > # removes from 255th char forward > $fields[$i] = substr($fields[$i],0,255); > } > > # only include fields #0 and #2 (change to your needs) > @fields = @fields[0,2]; > > # print the comma delimeted fields > print join(',', @fields); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]