my $ta = param('textbox'); $ta =~ s/\r?\n//g; print $ta; # or if you really want an array: my @v = split /\r?\n/, param('textbox');