Greetings, Perl control-character gurus.
This lowly perl peon seeks advice on what is probably a
very simple control char problem...
My script takes input from a text box and prints it into an
email (sent using unix sendmail). When I send these emails
to myself, my email program (Pegasus mail) shows ~nl~ wherever the user hit return in the
original text box, yet other parts of the script which
generate *html* from the text input work fine.
I presume the ~nl~ means newline, so I have tried adding s///
lines to remove \n, \r, cM, etc. Nothing I have hit upon seems
to fix this.
----------------------------
Original code:
sub add_email_message {
$subject = "New Ad";
$message = "The following ad (number $new_counter) was added.
$form_data{'caption_header'} $form_data{'caption'}
$form_data{'text'}
...(notice assignment to $message has not reached end quote)...
------------------------------------------
New code:
sub add_email_message {
$peg_nl = $form_data{'text'};
$peg_nl =~ s/\n/ /g;
$subject = "New Ad";
$message = "The following ad (number $new_counter) was added.
$form_data{'caption_header'} $form_data{'caption'}
$peg_nl
...(notice assignment to $message has not reached end quote)...
----------------------------------
I will reward you with 1000 thank-you's if you can help with this,
because then I can go eat dinner! :)