mav3067 has asked for the wisdom of the Perl Monks concerning the following question:
sub load_parents { my ($parent_index) = @_; my %parents; open (FH, "< $parent_index") or die "could not open file $parent_i +ndex for reading:$!"; while (my $line = <FH>) { chomp($line); my ($index, $parent) = split(/\t/, $line); $parents{$index} = $parent; } return \%parents; } sub load_primers { my ($primer_index) = @_; my %primers; open (FH, "< $primer_index") or die "could not open file $primer_i +ndex for reading:$!"; while (my $line = <FH>) { chomp($line); my ($index, $primer) = split(/\t/, $line); $primers{$index} = $primer; } return \%primers; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: handling different new line characters
by Velaki (Chaplain) on Aug 28, 2006 at 15:09 UTC | |
|
Re: handling different new line characters
by swampyankee (Parson) on Aug 28, 2006 at 16:23 UTC | |
|
Re: handling different new line characters
by McDarren (Abbot) on Aug 29, 2006 at 02:28 UTC | |
|
Re: handling different new line characters
by planetscape (Chancellor) on Aug 29, 2006 at 08:39 UTC | |
|
Re: handling different new line characters
by jaa (Friar) on Aug 29, 2006 at 08:05 UTC | |
|
Re: handling different new line characters
by chromatic (Archbishop) on Aug 31, 2006 at 01:00 UTC |