in reply to Re^3: Detect line endings with CGI.pm upload
in thread Detect line endings with CGI.pm upload

So, how do you know what key1 is a representation for. To put it another way... How do you know what column value key1 is a u +nique value in? Or am I missing something obvious? I'm trying to get a picture of this dataset built off of a database. D +o you have a simple snapshot of the datasets you might be receiving?

Replies are listed 'Best First'.
Re^5: Detect line endings with CGI.pm upload
by apu (Sexton) on Dec 27, 2008 at 08:39 UTC

    Not the real data but think of it as

    apple      red
    orange     orange
    grape      green
    apple      green
    

    Neither the keys nor values must be unique; the script will take care of merging the multiple values for a single key, if needed. The source database thinks it is outputting key{tab}value{newline} but, because of the different line-endings, I get key{tab}value{\cM} instead. At least, I do when the end-user creates the file on a Mac. But, other end users can create this source file on a Windows system where I get different line endings so I need to accommodate any line ending. This is also one of three source files which could all come from different sources before the end-user uploads them using this CGI script.

    I was hoping there was a Perl/CGI.pm equivalent of FTP's "ASCII" mode.