Thanks 4 responding. Yes, I notice I put that $subject on the wrong line - it isnt in my actual code, just a typo.
As for having '@' chars in the input, I don't know. The input is actually POSTed from a web page. I have decoded it like so:
# Get POSTED info and stick it in $post_info.
read (STDIN, $post_info, $ENV {'CONTENT_LENGTH'} );
# split off fields and put them in @InfoArray
@InfoArray = split(/&/, $post_info);
# Remove variable= part and translate data into real chars
for ($n = 0; @InfoArray[$n]; $n++)
{
chomp; # remove newline
($dummy, $temp) = split (/=/, @InfoArray[$n]);
$temp =~ tr/+/ /;
$temp =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
@InfoArray [$n] = $temp;
}
Does anyone see something dodgy with that little lot?
Also, yes, it may be a null character, but I have chomped and choped the last line of text, and even done a 'get rid of crap' command
$article =~ s/\ 0//g;, all to no avail.
Sheesh, It's gonna take me a while to get used to PERL. It's very powerful and, if you know it, quick, but it's so untidy! Im a Java man you see...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.