[thelist] Re: Formatting textarea

Katherine Spice k.spice at acu.ac.uk
Tue Feb 20 05:45:08 CST 2001


Hi Adrian,

Try commenting out (#) this line:

$temp =~ s/[\r\n]/ /g;

and see what happens. If that doesn't work, feel free to send me the
whole thing off list, and I'll take a look. Don't get me wrong - I'm no
expert :-) but I can't resist a challenge!

Katherine

Adrian Fischer wrote:
> 
> Hi Katherine,
> 
> It must be me.....it still doesnt format the text.  Perhaps I ve got it in
> the wrong place.  The actual textarea is in a different sub to the one Im
> doing (trying) the formatting in.  The texatarea string gets to the new sub
> but unformatted.  Could it be that my form data processing routine isnt
> structured right?
> Perhaps an expert out there would look at this and tell me?  Perhaps this
> sub is stripping all the returns and what not out already so that by the
> time it gets to my formatting code there is nothing to act upon...makes
> sense doesnt it?
> 
> <snip>
> ####FORM DATA
> sub get_form_data {
>         my $temp;
>         my $buffer;
>         my @data;
>         read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>         foreach $temp (split(/&|=/,$buffer)) {
>                 $temp =~ tr/+/ /;
>                 $temp =~ s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
>   $temp =~ s/[\r\n]/ /g;
>                 push @data, $temp;
>         }
>         foreach $temp (split(/&|=/,$ENV{'QUERY_STRING'})) {
>                 $temp =~ tr/+/ /;
>                 $temp =~ s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
>   $temp =~ s/[\r\n]/ /g;
>                 push @data, $temp;
>         }
>         return @data;
> }
> </snip>
> 
> Thanks Again
> 
> Adirna Fischer
>




More information about the thelist mailing list