in reply to Re^5: globbed variable in parse cgi form - beyond me
in thread globbed variable in parse cgi form - beyond me
Yes I expected there would be something to switch off xhtml. I tried - use CGI qw/:html4/; but maybe that has more to do with importing methods.
As a third point I forgot to mention a lot of the styling is rendered from css so that negates the use of attributes a bit too.
The real difficulty i am having now that i have extracted the data using the param methods is in relation to placing a textareas' value into a non textarea element such as a regular div and making it format to P or BR at the newline. I've tried mixing cgi methods with arrays and array scalars explicit and sometimes very explict. lol. And trying to regexp substitute P tags with existing carriage returns and newlines but I just cannot get that value to split and format from a predifined newline character(? i saw a ^M at one point if i can figure waht that is maybe im in with a shot). Maybe I have to tr/%daf/pack hex/ as i haven't done that yet.
my $ctp = CGI->new; my $webmaster = "http\:\/\/www.mysite.com\/"; my @names= $ctp->param; my @values; foreach my $name(@names){ my $value = $ctp->param($name); push(@values, $value); } # print "Content-type: text/plain\r\n\r\n"; my @tone = $ctp->param('tone'); #print $ctp->p(tone); my $doob; #print $ctp->p("@tone"); print "\@tone: @tone\n\n"; if ($tone[0] =~ m/\\n/){ print "[^f]*. globals and carriage returns an +d zero array value arrays !!\n\n"; } foreach my $toneadd(@tone){ if ($toneadd =~ m/\\r\\n/){ print "[^f]*. globals and carri +age returns!!\n\n"; $toneadd =~ s/\\r\\n/<\/p><p>/;} $doob .= $toneadd; print "\$toneadd: $toneadd\n\n"; } my @tone = $ctp->param('tone'); foreach my $toneadd(@tone){ $line .= "<p>$toneadd<\/p>"; } print $line; print "\$doob: $doob\n\n"; print "<p>$doob<\/p>\n\n";
Which after another quick & useless debug sesh, I think is shifting me back round to the initial importing through a glob query. Though I can just go and re-open the file again and them in afterwards maybe a good enough workaround even if time consuming.
OR I gotta read some more stuff somewhere....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: globbed variable in parse cgi form - beyond me
by Anonymous Monk on Jun 28, 2011 at 08:38 UTC |