Forum Moderators: coopster & phranque

Message Too Old, No Replies

Perl+CSV error driving me crazy!

Any help appreciated. Deadline looming!

         

keithb

11:14 pm on Jan 25, 2004 (gmt 0)



Hi there - I have created a form that interacts with Perl-based Sendmail scripts (formread.pl, formwrite.pl, etc.). The HTML has all the form fields named (i.e. <INPUT TYPE="radio" NAME="q1" VALUE="yes"> to correspond with Excel's CSV file which is house on the server as well.

When I execute the form from the Web, I receive the error "Error. Can't open the CSV file."

The form has obviously found it and I made sure the permissions (CHMOD) on the csv file are 777 and still no luck. Additionally -- I uploaded the file via the ASCII protocol as the client requested.

The csv file itself has all the fields in the same order as the form and I cannot see any spelling or case errors.

I created a similar form at the client's office with success, but I can't seem to replicate it. And no, the person I've replaced is on vacation so I can't go back and ask.

Any help would be dandy.

Thanks,
Keith

Laxters

6:10 pm on Jan 26, 2004 (gmt 0)

10+ Year Member



Perhaps a problem with \n vs \r?

Also, if you look at .CSV files in a text editor, most of the fields I'm used to working with are surrounded in double-quotes, so try that too?

For example:

Field1, Field2
"value 1","value 2"
"value 3", "value 4"

Hope that helps.