Buenas,
Lo intento de la primera forma pero no me compila
syntax error at ./perl_first_webstats.pl line 90, near "print"
syntax error at ./perl_first_webstats.pl line 104, near "}"
Execution of ./perl_first_webstats.pl aborted due to compilation errors.
Código PERL:
Ver original81 sub Mostrar_Config_Actual {
83
84 print "\n--------------------------------------------------------------------------------\n"; 85 print colored
(" CONFIGURACION ACTUAL",'cyan'),"\n"; 86 print "--------------------------------------------------------------------------------\n"; 87 open my $FICHERO, "</etc/awstats/web/$file" 88 or {
89 print colored
(" [ERROR] >>> No existe el fichero introducido ",'bold red'); 91 print "$file", colored
(" en /etc/awstats/web/",'bold red'),"\n\n"; 93 }
94
95 while (<$FICHERO>) {
96 next if /^\s*#/; # obviamos los comentarios
97 next if /^\s*$/; # obviamos las lÃ*as vacÃ* o en blancoi
99 }
101
102 $SITE_DOMAIN=qx(grep -v
'#' /etc
/awstats
/web
/$file | grep -i SiteDomain
| cut
-d
'=' -f2
| sed
's/"//g'); 103 print "\n--------------------------------------------------------------------------------\n"; 104 }
Muchas gracias de antemano!