read textfield from using PERL
Hi, I am trying to read data from the form's text field using PERL script. Following is the perl code I am using, #!/usr/local/bin/perl use CGI; $cgiobject = new CGI; $userphone=$cgiobject->param("textfield"); print qq# welcome me ! $userphone #; "textfield" is a multiline text box in the form. But, when I read it in the script, the textfield looses the extra spaces or paragraph spaces from the textfield. Will it be possible to get the data as it is filled in the text field ?? Thanks, Prashant __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: read textfield from using PERL
prashan kukde wrote: > > "textfield" is a multiline text box in the form. > But, when I read it in the script, the textfield > looses the extra spaces or paragraph spaces from the > textfield. Will it be possible to get the data as it > is filled in the text field ?? do you mean a form element? html does not know what 'extra spaces' are. try running the data through a regex to get it to display correctly in a browser. i'd start with something simple: my $text = $cgi->param('textarea'); $text =~ s/ / /g; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: read textfield from using PERL
prashan kukde menulis pada tgl 06 December 2001 Thursday 04:27 am sbb: :: Hi, :: I am trying to read data from the form's text field :: using PERL script. Following is the perl code I am :: using, :: #!/usr/local/bin/perl :: :: use CGI; :: :: $cgiobject = new CGI; :: $userphone=$cgiobject->param("textfield"); hi prashan, don't add double quote at the textfield $userphone=$cgiobject->param(textfield); Regards, Djoko Priyono www.dnet.net.id :: :: print qq# :: welcome me ! :: $userphone :: #; :: :: "textfield" is a multiline text box in the form. :: But, when I read it in the script, the textfield :: looses the extra spaces or paragraph spaces from the :: textfield. Will it be possible to get the data as it :: is filled in the text field ?? :: Thanks, :: Prashant :: :: :: __ :: Do You Yahoo!? :: Send your FREE holiday greetings online! :: http://greetings.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: read textfield from using PERL
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > prashan kukde menulis pada tgl 06 December 2001 Thursday 04:27 am sbb: > :: Hi, > :: I am trying to read data from the form's text field > :: using PERL script. Following is the perl code I am > :: using, > :: $cgiobject = new CGI; > :: $userphone=$cgiobject->param("textfield"); > don't add double quote at the textfield > > $userphone=$cgiobject->param(textfield); of course, that is incorrect. now perl will look for a textfield function, which is not what you want. > :: textfield. Will it be possible to get the data as it > :: is filled in the text field ?? it depends on what the user-agent decides to send. -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]