in reply to Feedback Appreciated on text-parsing, SQL querying subroutine
I would like to notify some points to you, from your code.
If there is any error in opening the file Just you are printing the error message and continuing the code withunless (open(INPUT, "$inputfile")) { print "ERROR: Can't open file for reading : $!\n"; }
The above code can be written as# splitting on tab character my @data = split("\t", $_); # assigning varables my $did1 = $data[0]; my $did2 = $data[1]; my $score1 = $data[2]; my $score2 = $data[3];
my ( $did1,$did2,$score1,$score2 ) = (split("\t", $_))[0..3];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Feedback Appreciated on text-parsing, SQL querying subroutine
by saberworks (Curate) on May 31, 2006 at 19:25 UTC | |
|