The newline character is determined by the sending system. On Win/DOS thats \n\r, on *nix its \n and Mac <= OS 9 I believe is \r\n but don't quote me on that (OS X is \n like all Unixes)
As for your problem: the textarea is going to be returned as a single string that contains newlines so chomp() would only get rid of the last one anyway. If you want the string as an array this should work:
my $textarea = $q->param('textarea'); my $textarea =~ s/\r//g; # get rid of any \r characters my @array = split(/\n/,$textarea);
Hope that helps
Lobster Aliens Are attacking the world!In reply to Re: Textarea boxes in CGI
by cfreak
in thread Textarea boxes in CGI
by eweaverp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |