Counting text area

G

Gunnar Hjalmarsson

John said:
When this is run from an Apache server:

my $fe = $q->param( 'friend_email' ); # text area

my $msg;
if ( $fe =~ /\r/ ){
$msg = 'found \r'
}

print $q -> p( $msg );

I get 'found \r'.

Okay. But don't you mean when a textarea field with linebreaks is
submitted from a Windows browser?

The problem I was talking about (which is related) is that if you
display a textarea field with embedded text in a Windows browser, and
the text includes \r\n linebreaks (which it typically does if the
script is run on Windows), each occurrence of \r *or* \n appears to be
exchanged for \r\n before display. In other words, if you don't
binmode STDOUT, the numbers of linebreaks are doubled.

This sub-thread seems to have turned off topic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top