Bonjour,
j'ai lu http://perl.enstimac.fr/ModulesFr/CGI.html pourtant, lorsque je souhaite ecrire des attributs de body dans un html_start ça ne marche pas :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
#!"C:\perl\bin\perl.exe"
use CGI qw/:standard/;
$CGI::POST_MAX=1024 * 100;  # max 100K posts
$CGI::DISABLE_UPLOADS = 1;  # no uploads
my $erreur="";
my $script=new CGI;
my $action = "./result.pl";
my $method = "post";
my $encoding ="application/x-www-form-urlencoded";
my $styleForm ="border:0px;margin:0px";
print $script->header(-type=>"text/html",
-charset=>"utf-8");
print $script->start_html(-title=>"Clustering Meta-Engine 2 Perl version",
,-meta=>{http-equiv=>"Content-Type",content=>"text/html",charset=>"UTF-8"},
 
-style=>{"src"=>"mdl/mdl-css/mmc-css.css"}, -leftmargin=>"0", -rightmargin=>"0", -topmargin=>"0", -bottommargin="0" );
 
 
print div({-class=>"page", -align=>"center"},
 
br(),
a({-href=>"index.pl"}, img{src=>"./image/cme.jpg",width=>"232px",height=>"124px",border=>"0",alt=>"Conceptual Meta-Engine"}),
 
$script->start_form(-method=>$method,
                            -action=>$action,
                            -enctype=>$encoding,
                            {-style=>$styleForm}),
 
span({class=>"sstitre"},"Query me :"),
      br(),br(),
 
      $script->textfield({class=>"formulaires"},{style=>"width:385px;"},-name=>"recherche",
                           -default=>"",
                           -override=>1,
                           -size=>50,
                           -maxlength=>500),
         br(),br(),
         center($script->submit(-name=>"button_name",
                        -value=>"")),
         $script->endform,
         print br(),br(),
span ({class=>"texte_little"},"Clustering Meta-Engine 2 © "), br(),br(),
$query->end_html;
en effet, apres le -style{} mes margins generent un can't modify negation in scalar assignment.
Quelqu'un peut il m'eclairer ?