-----Original Message-----
From: Aimal Pashtoonmal [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 9:40 PM
To: [EMAIL PROTECTED]
Subject: RE: Simple script requires simple soulution
Hello,
I have the script below giving the folowing error meesages.
=>Useless use of string in void context at
extract_data_from_IPR_HMM_libs.pl
line 12.
=>Useless use of a constant in void context at
extract_data_from_IPR_HMM_libs.pl line 13.
Even though the script works and I get the desired output, what is
causing these messages?
Also, does anyone know how I introduce a blank line. The script starts
printing out beginning with NAME on the first line. I am trying to get a
blank before every NAME line except the very for first.
cheers.
_SCRIPT_
#!/usr/bin/perl -w
use strict;
my $infile = $ARGV[0];
my $dataread;
my $line;
my $dbsize;
CHANGE :
open(INFILE, $infile) || "unable to open file $infile: $! \n";
open(OFILE, ">$infile.HMMdata") || "couldnt open output file";
INTO :
open(INFILE, $infile) || die "unable to open file $infile: $! \n";
open(OFILE, ">$infile.HMMdata") || DIE "couldnt open output file";
while ($line = <INFILE>) {
$dbsize++ if ( $line =~ /^HMMER/ );
$dataread = 1 if ( $line =~ /NAME\s/ );
$dataread = 0 if ( $line =~ /^HMM\s/ );
print "$line" if $dataread;
}
print "Database size for $infile = $dbsize\n";
close INFILE;
close OFILE;
exit;
_END_
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]