#!/usr/bin/perl
#Cambiar la linea anterior para que corresponsa a su sistema
#ejecutando "which perl" le dice conde esta el ejecutable
unshift (@INC, $ENV{'W2H_POSTPROCESS_PATH'});
require "XXX_cfg.pl"; # config file
$database="test";
# Open input and output files */
open(INFILE,"<$ARGV[0]");
open(OUTFILE,">&STDOUT");
print OUTFILE "Content-type: text/html\n\n";
print OUTFILE "<HTML>\n<HEAD>\n</HEAD>\n<BODY>\n<PRE>\n";
&HorizontalParsing();
print OUTFILE "\n</PRE>\n</BODY>\n</HTML>";
close(INFILE);
close(OUTFILE);
exit(0);
sub is
{
my ($help)=@_;
if ((length($help)>3) && ($help =~ /^\D/)) {return 1}
else {return 0;}
}
sub HorizontalParsing
{
# skip the header
seek(INFILE,0,0);
do
{
$buffer=<INFILE>;
return unless defined $buffer;
print OUTFILE $buffer;
$linecounter=5;
}
if (<INFILE>)
{
$line=$_;
if ($_ =~ /___/)
{
$linecounter=0;
}
else
{
$linecounter=$linecounter+1;
}
if ($linecounter == 2)
{
($enzyme, $datas)=split(" ");
$enzyme2=uc($enzyme);
$XXXCommand=join('','wgetz?-e+[',$database,'-ID:',$enzyme2,']');
printf OUTFILE "<A href=\"%s/%s\">%s</A>",$XXX,$XXXCommand,$enzyme2;
}
}
print OUTFILE "buffer1 \n";
}
so why am I getting error inthe if cicle? this is supposue to take as
imput file a fiel that has some ____ and then 2 lines after the _______
has a name over wich must be a link that should loiok like what is on the
print outfile satament, but I am getting an error mesg.. why on the if ?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]