>> I am sending a text file with SQL statements via Form to a CGI.

> Are you trying to upload a file, or are you just sending the file
> contents as an ordinary parameter?

        Just the file contents as a parameter



>> I am trying to make the file as a one line (and deleting extra spaces
>> too), to later split them using the ; as delimiters.
>> The problem is that after the operation, no lines are stored in
>> the array.

>> Any idea about what is happening?

>> use CGI;
>> my $cgi_this = new CGI;
>>   my $str_file = $cgi_this->param('file');
>>   $str_file =~ s/\s+/ /gs;
>>   my @arr_sqlqueries = split (/;/, $str_file);
>>   ....


> Please show us the form.



<form action="/cgi-bin/i-nstaller.cgi" method="POST" target="_blank">
  <table cellpadding="2" cellspacing="2" border="0" width="400"
 align="center"><tbody><tr>
       <td align="right">Create services SQL file: </td>
       <td valign="top"><input type="file" name="file"></td>
     </tr><tr>
           <td valign="top" align="right">Licence: </td>
           <td valign="top"><input type="text" name="licence"
 value="demo"></td>
     </tr><tr>
           <td valign="top" align="right">Login: </td>
           <td valign="top"><input type="text" name="login"
 value="webmaster"></td>
     </tr><tr>
           <td valign="top" align="right">Password: </td>
           <td valign="top"><input type="text" name="password" value="*"> </td>
     </tr><tr>
           <td valign="top" align="right"><br></td>
           <td valign="top"><input type="submit" name="init"
 value=" INIT "></td>
     </tr></tbody>
  </table>
</form>



--



Saludos,


J. Alejandro Ceballos Z. | -------------------------------+------------------------------ http://alejandro.ceballos.info | [EMAIL PROTECTED] | -------------------------------+ |


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to