Jan Eden wrote:
Jan Eden wrote on 10.12.2004:
I use the following to read in lines from an uploaded file:
my $fh = $q->upload('input_file');
while (<$fh>) { push @urls, $_; }
It works fine when the file has UNIX or DOS linebreaks, but it fails
with Macintosh linebreaks. What is the best method
Jan Eden wrote on 10.12.2004:
>I am also a little confused about which line endings come with text uploaded
>via
>a textarea. I use:
>
>my $input = $q->param('input');
>$input =~ s/[\r\n]{2,}/\n/g;
>my @urls = split /\n/, $input;
>
>to make sure I have not more than one linebreak. Th
Hi,
I use the following to read in lines from an uploaded file:
my $fh = $q->upload('input_file');
while (<$fh>) { push @urls, $_; }
It works fine when the file has UNIX or DOS linebreaks, but it fails with
Macintosh linebreaks. What is the best method to read in a Macintosh file
(othe
Jan Eden wrote on 10.12.2004:
>Hi,
>
>I use the following to read in lines from an uploaded file:
>
>my $fh = $q->upload('input_file');
>while (<$fh>) { push @urls, $_; }
>
>It works fine when the file has UNIX or DOS linebreaks, but it fails
>with Macintosh linebreaks. What is the best me