On Tue, 2002-01-15 at 16:24, Joel Gwynn wrote:
> grrrrr.  I'm trying to parse an uploaded file that was created on a macintosh.  With 
>PC files, I use this snippet:
> 
> my $rawfile = $cgi->param($p);
> my @data = <$rawfile>;
> 
> which creates an array, each element of which is one line of text.  With files 
>created on a mac, the whole file gets put into $data[0], which is not what I want.  
>What's the best way to handle this, since I want to be able to handle files uploaded 
>by both mac and pc users?

that's because of the line ending difference - i believe there is a CPAN
module for converting them but it should be a simple s/// or split
(however I dont remember what the character is on mac)

-- 
Jay McCarthy <[EMAIL PROTECTED]>

Reply via email to