Bonjour, je voudrai faire un générateur de fichier.pac pour simplifer la lecture de ceux-ci (11 fichiers.pac) qui se ressemble beaucoup.
Voici comment je m'y prends :
#!/usr/bin/perl

use strict;
use warnings;

#declaration de la fonction
my $function_find_proxy=<<BALISE
function FindProxyForURL(url, host)
{
BALISE

my $end_DIRECT=<<BALISE
// Otherwise use proxy Bureautique
else return "DIRECT";
}
BALISE

my $return_DIRECT=<<BALISE
{ return "DIRECT"; }
BALISE

my $paragraphe1_non_FQDN_hosts=<<BALISE
// Direct connections to non-FQDN hosts
if (isPlainHostName(host))
BALISE
en gros :
function FindProxyForURL(url, host)
{
// Direct connections to non-FQDN hosts
if(isPlainHostName(host))
{ return "DIRECT"; }
// Otherwise use proxy Bureautique
else return "DIRECT";
}
Puis je les concatene grâce au "." :
$function_find_proxy.$paragraphe1_non_FQDN_hosts.$return_DIRECT.$end_DIRECT>proxy1.pac;
Mais ça me retourne pas mal d'erreur du genre : "my" variable $function_find_proxy masks earlier declaration in same statement at generateur_proxy_pac2.v2.pl line 418.

si j'enleve le "my" j'ai encore d'autres erreurs...

Pouvez vous m'aider ? ça me semble simple, mais bon...