Hi guys,
I have a CGI script to process some data from the
visitors. The input data takes this format(row x
column):
1 2 4 5 6 7
100 90 50 30 20 0
After processing I want to print out the result in the
same format(row x column). But when I ran my script I
only get a row only:
1 2 4 5 6 7 100 90 50 30 20 0
It looks like all lines are changed into a string
only. Can anyone there give me a hand?
Thanks,
Li
here is the code:
#!c:/Perl/bin/perl.exe
use warnings;
use strict;
use CGI qw/:standard/;
###################create forms
my $q=CGI->new();
print
$q->header,
$q->start_html('Survival Curve'),
$q->h1('Survival Curve'),
$q->start_form(),
$q->textarea( -name=>'data',
-default=>'',
-rows=>10,
-columns=>50),
$q->p,
$q->submit('Submit'),
$q->end_form();
######################process the data
my @data=();
my $cgi=CGI->new();
my $line=$cgi->param('data');
if ($line ne '' ){
my @temp=split/\t+/,$line;
push @data,[EMAIL PROTECTED];
}
for my $ref(@data){
print "[EMAIL PROTECTED]","\n";
print $cgi->p;
}
print $q->end_html();
exit;
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>