Salut,
J’aimerai vous soumettre ces quelques lignes d’un script perl que j’ai pioché sur la toile, d’où il en ressort ces quelques erreurs, vraisemblablement sans trop de conséquences puisque qu’il fait son boulot, mais cela me chagrine un temps soit peu …
Son but; la mise à jour d’une ip dynamique
Le script étant consistant (938 lignes) je joins les lignes concernées.
En mode verbeux, option -w … sauf erreur de ma part!
#!/usr/bin/perl -w
Les erreurs, je crois …
[root@yunohost] ~ # perl /usr/bin/addns.pl
"my" variable $server_host masks earlier declaration in same scope at /usr/bin/addns.pl line 200.
"my" variable $msg masks earlier declaration in same scope at /usr/bin/addns.pl line 311.
False [] range "\w-" in regex; marked by <-- HERE in m/\[([\w- <-- HERE \._]+?)\]\s*?\{(.*?)\}/ at /usr/bin/addns.pl line 459.
Use of uninitialized value in string eq at /usr/bin/addns.pl line 863.
webcheck: system type not specified, using default - "dyndns"
webcheck: ip (x.x.x.x) already correct in database
[root@yunohost] ~ #
ligne 200
my $server_host = $host_v{$curr_host}{'server_host'};
ligne 311
my $msg="";
ligne 459
[code]if($text =~ m/[([\w-._]+?)]\s*?{(.*?)}/gs) {
}[/code]
ligne 863
elsif ( $cmd_args{'update_host'}[0] eq "" &&
Erreur de syntaxe ???