Bonjour,
ce code ne comporte aucune erreur :
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85 #!"C:\perl\bin\perl.exe" use strict; use warnings; use CGI::Pretty qw/:standard/; $CGI::POST_MAX = 1024 * 100; # max 100K posts $CGI::DISABLE_UPLOADS = 1; # no uploads my $erreur = ""; my $action = "result.pl"; my $method = "post"; my $encoding = "application/x-www-form-urlencoded"; my $styleForm = "border:0px;margin:0px"; print header( -type => "text/html", -charset => "iso-8859-1" ); print start_html( -title => "Clustering Meta-Engine 2 Perl version", , -meta => { 'http-equiv' => "Content-Type", charset => "UTF-8" }, -style => { "src" => "/images/mmc-css.css" }, -leftmargin => "0", -rightmargin => "0", -topmargin => "0", -bottommargin => "0" ), div( { -class => "page", -align => "center" }, br(), a( { -href => "index.pl" }, img { src => "/images/cme.jpg", width => "232px", height => "124px", border => "0", alt => "Conceptual Meta-Engine" } ), ), start_form( -method => $method, -action => $action, -enctype => $encoding, { -style => $styleForm } ),br(), div( { -style => 'text-align:center' }, span( { class => "sstitre" }, "0o A meta clustering engine o0" ), br(), br(), textfield( { class => "formulaires" }, { style => "width:500px;" }, -name => "recherche", -default => "Query me", -override => 1, -size => 300, -maxlength => 500 ), ), p( { -style => 'text-align:center' }, submit( -name => "button_name", -value => "search" ) ), endform, br(), br(), div( { -style => 'text-align:center' }, span( { class => "texte_little", -align => "center" }, "Clustering Meta-Engine 2 © Pr Luc Quoniam - Julien Agullio - ***** ",br(), img { src => "/images/perl.gif", width => "74px", height => "34px", border => "0", alt => "Propulsé par PERL" }), ), br(), br(), end_html;
alors que le même avec un petit "read(STDIN,my $recherche,$ENV{CONTENT_LENGTH});
my $search = uri_escape($recherche);
if(length($recherche)==0){" avant la série de print provoque 2 erreurs :
inutile de préciser que j'ai essayé de virer use strict après avoir lu les messages mais ca déclenche d'autres erreurs. Quelqu'un pourrait il m'aider ?
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92 #!"C:\perl\bin\perl.exe" use warnings; use strict; use URI::Escape; use CGI::Pretty; read(STDIN,my $recherche,$ENV{CONTENT_LENGTH}); my $search = uri_escape($recherche); if(length($recherche)==0){ $CGI::POST_MAX = 1024 * 100; # max 100K posts $CGI::DISABLE_UPLOADS = 1; # no uploads my $erreur = ""; my $action = "result.pl"; my $method = "post"; my $encoding = "application/x-www-form-urlencoded"; my $styleForm = "border:0px;margin:0px"; print header( -type => "text/html", -charset => "iso-8859-1" ); print start_html( -title => "Clustering Meta-Engine 2 Perl version", , -meta => { 'http-equiv' => "Content-Type", charset => "UTF-8" }, -style => { "src" => "/images/mmc-css.css" }, //leve bareword endform not allowed while strict sub in use :\ -leftmargin => "0", -rightmargin => "0", -topmargin => "0", -bottommargin => "0" ), div( { -class => "page", -align => "center" }, br(), a( { -href => "index.pl" }, img { src => "/images/cme.jpg", width => "232px", height => "124px", border => "0", alt => "Conceptual Meta-Engine" } ), ), start_form( -method => $method, -action => $action, -enctype => $encoding, { -style => $styleForm } ),br(), div( { -style => 'text-align:center' }, span( { class => "sstitre" }, "0o A meta clustering engine o0" ), br(), br(), textfield( { class => "formulaires" }, { style => "width:500px;" }, -name => "recherche", -default => "Query me", -override => 1, -size => 300, -maxlength => 500 ), ), p( { -style => 'text-align:center' }, submit( -name => "button_name", -value => "search" ) ), endform, br(), br(), div( { -style => 'text-align:center' }, span( { class => "texte_little", -align => "center" }, "Clustering Meta-Engine 2 © Pr Luc Quoniam - Julien Agullio - ***** ",br(), img { src => "/images/perl.gif", //leve bareword end_html not allowed */while strict sub in use width => "74px", height => "34px", border => "0", alt => "Propulsé par PERL" }), ), br(), br(), end_html; }
Partager