Será que alguien me puede dar una indicación. Mis fichero que deseo abrir tienen permisos 755.
Using perl Syntax Highlighting
#!/usr/bin/perl
use CGI qw(:all);
use HTML::Template;
use kreader qw(makefile cfind swrite fwrite fedit);
print header;
if (param('do') eq "editar"){
%campss1 = ("id","1","tipo","sencilla","valor",param('sencilla_es'));
%campss2 = ("id","2","tipo","doble","valor",param('doble_es'));
%campss3 = ("id","3","tipo","triple","valor",param('triple_es'));
%campss4 = ("id","4","tipo","cuadruple","valor",param('cuadruple_es'));
%campss5 = ("id","1","tipo","sencilla","valor",param('sencilla_su'));
%campss6 = ("id","2","tipo","doble","valor",param('doble_su'));
%campss7 = ("id","3","tipo","triple","valor",param('triple_su'));
%campss8 = ("id","4","tipo","cuadruple","valor",param('cuadruple_su'));
%campss9 = ("id","5","tipo","junior_su","valor",param('junior_su'));
%campss10 = ("id","6","tipo","suitcarolina_su","valor",param('suitcarolina_su'));
$ok = fedit("tarifas_es.txt",%campss1);
$ok = fedit("tarifas_es.txt",%campss2);
$ok = fedit("tarifas_es.txt",%campss3);
$ok = fedit("tarifas_es.txt",%campss4);
$ok = fedit("tarifas_su.txt",%campss5);
$ok = fedit("tarifas_su.txt",%campss6);
$ok = fedit("tarifas_su.txt",%campss7);
$ok = fedit("tarifas_su.txt",%campss8);
$ok = fedit("tarifas_su.txt",%campss9);
$ok = fedit("tarifas_su.txt",%campss10);
print "<center>REGISTROS ACTUALIZADOS</center>";
};
%tabla1 = cfind("tarifas_es.txt",'0','1');
%tabla2 = cfind("tarifas_es.txt",'0','2');
%tabla3 = cfind("tarifas_es.txt",'0','3');
%tabla4 = cfind("tarifas_es.txt",'0','4');
%tabla5 = cfind("tarifas_su.txt",'0','1');
%tabla6 = cfind("tarifas_su.txt",'0','2');
%tabla7 = cfind("tarifas_su.txt",'0','3');
%tabla8 = cfind("tarifas_su.txt",'0','4');
%tabla9 = cfind("tarifas_su.txt",'0','5');
%tabla10 = cfind("tarifas_su.txt",'0','6');
open (DATABASE, "tarifas.htm") || die "No se pudo abrir archivo";
while($linea = <DATABASE>){
$linea =~ s/::sencilla_es::/$tabla1{'valor'}/;
$linea =~ s/::doble_es::/$tabla2{'valor'}/;
$linea =~ s/::triple_es::/$tabla3{'valor'}/;
$linea =~ s/::cuadruple_es::/$tabla4{'valor'}/;
$linea =~ s/::sencilla_su::/$tabla5{'valor'}/;
$linea =~ s/::doble_su::/$tabla6{'valor'}/;
$linea =~ s/::triple_su::/$tabla7{'valor'}/;
$linea =~ s/::cuadruple_su::/$tabla8{'valor'}/;
$linea =~ s/::junior_su::/$tabla9{'valor'}/;
$linea =~ s/::suitcarolina_su::/$tabla10{'valor'}/;
$dato2 = $dato2.$linea;
}
$salida = $dato2;
close (DATABASE);
print $salida;
use CGI qw(:all);
use HTML::Template;
use kreader qw(makefile cfind swrite fwrite fedit);
print header;
if (param('do') eq "editar"){
%campss1 = ("id","1","tipo","sencilla","valor",param('sencilla_es'));
%campss2 = ("id","2","tipo","doble","valor",param('doble_es'));
%campss3 = ("id","3","tipo","triple","valor",param('triple_es'));
%campss4 = ("id","4","tipo","cuadruple","valor",param('cuadruple_es'));
%campss5 = ("id","1","tipo","sencilla","valor",param('sencilla_su'));
%campss6 = ("id","2","tipo","doble","valor",param('doble_su'));
%campss7 = ("id","3","tipo","triple","valor",param('triple_su'));
%campss8 = ("id","4","tipo","cuadruple","valor",param('cuadruple_su'));
%campss9 = ("id","5","tipo","junior_su","valor",param('junior_su'));
%campss10 = ("id","6","tipo","suitcarolina_su","valor",param('suitcarolina_su'));
$ok = fedit("tarifas_es.txt",%campss1);
$ok = fedit("tarifas_es.txt",%campss2);
$ok = fedit("tarifas_es.txt",%campss3);
$ok = fedit("tarifas_es.txt",%campss4);
$ok = fedit("tarifas_su.txt",%campss5);
$ok = fedit("tarifas_su.txt",%campss6);
$ok = fedit("tarifas_su.txt",%campss7);
$ok = fedit("tarifas_su.txt",%campss8);
$ok = fedit("tarifas_su.txt",%campss9);
$ok = fedit("tarifas_su.txt",%campss10);
print "<center>REGISTROS ACTUALIZADOS</center>";
};
%tabla1 = cfind("tarifas_es.txt",'0','1');
%tabla2 = cfind("tarifas_es.txt",'0','2');
%tabla3 = cfind("tarifas_es.txt",'0','3');
%tabla4 = cfind("tarifas_es.txt",'0','4');
%tabla5 = cfind("tarifas_su.txt",'0','1');
%tabla6 = cfind("tarifas_su.txt",'0','2');
%tabla7 = cfind("tarifas_su.txt",'0','3');
%tabla8 = cfind("tarifas_su.txt",'0','4');
%tabla9 = cfind("tarifas_su.txt",'0','5');
%tabla10 = cfind("tarifas_su.txt",'0','6');
open (DATABASE, "tarifas.htm") || die "No se pudo abrir archivo";
while($linea = <DATABASE>){
$linea =~ s/::sencilla_es::/$tabla1{'valor'}/;
$linea =~ s/::doble_es::/$tabla2{'valor'}/;
$linea =~ s/::triple_es::/$tabla3{'valor'}/;
$linea =~ s/::cuadruple_es::/$tabla4{'valor'}/;
$linea =~ s/::sencilla_su::/$tabla5{'valor'}/;
$linea =~ s/::doble_su::/$tabla6{'valor'}/;
$linea =~ s/::triple_su::/$tabla7{'valor'}/;
$linea =~ s/::cuadruple_su::/$tabla8{'valor'}/;
$linea =~ s/::junior_su::/$tabla9{'valor'}/;
$linea =~ s/::suitcarolina_su::/$tabla10{'valor'}/;
$dato2 = $dato2.$linea;
}
$salida = $dato2;
close (DATABASE);
print $salida;
Coloreado en 0.005 segundos, usando GeSHi 1.0.8.4