Salut à tous,

En fait je voulais créer un plugin en perl et là j'ai un petit problème...

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
 
     ...
     13 use LWP::Simple;
     14 use strict;
     15 use diagnostics;
     16 use warnings;
     17 use Getopt::Long;
     ...
     24 my ($host_name,$service_name,$help_view);
     ....
     ....
     75 # Option de check_pacs
     76 GetOptions(
     77         "H|HOST=s" => \$host_name,
     78         "S|SERVICE=s" => \$service_name,
     79         "hel|hepl|help|aide" => \$help_view
     80 );
     81
     82
     83
     84 # HOST et SERVICE
     85 if (!defined ($host_name) || !defined ($service_name)){
     86         print "Ok: $host_name // $service_name";
     87         exit(0);}
     88
     89 else{
     90         print $manuel_view;
     91         exit(1);
     92 }
     93
     94 if ($help_view) {
     95         print $manuel_view;
     96         exit(0);
     97 }
Et là je reçois le message d'erreur, je me tue à chercher ou est l'erreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
Use of uninitialized value in concatenation (.) or string at ./check_pacs line 86 (#1)
    (W uninitialized) An undefined value was used as if it were already
    defined.  It was interpreted as a "" or a 0, but maybe it was a mistake.
    To suppress this warning assign a defined value to your variables.
 
    To help you figure out what was undefined, perl tells you what operation
    you used the undefined value in.  Note, however, that perl optimizes your
    program and the operation displayed in the warning may not necessarily
    appear literally in your program.  For example, "that $foo" is
    usually optimized into "that " . $foo, and the warning will refer to
    the concatenation (.) operator, even though there is no . in your
    program.
Merci de votre aide