rocketperl has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use 5.010; use strict; use warnings; open GL,'gene_list.txt'; open HFR,'HFR_genes.txt'; use List::MoreUtils qw(first_index indexes); my @gl=<GL>; my @hfr=<HFR>; chomp @gl; chomp @hfr; my $a; for($a=0;$a<=scalar(@hfr);$a++) { my @matching_indices=indexes {$hfr[$a]}@gl; my @matching_values=@gl[@matching_indices]; print "$matching_indices[$a]"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use of uninitialized value in array
by toolic (Bishop) on Aug 02, 2013 at 16:06 UTC | |
by hippo (Archbishop) on Aug 02, 2013 at 17:19 UTC | |
by rocketperl (Sexton) on Aug 02, 2013 at 16:14 UTC | |
|
Re: use of uninitialized value in array
by Cristoforo (Curate) on Aug 02, 2013 at 16:46 UTC | |
|
Re: use of uninitialized value in array
by ww (Archbishop) on Aug 02, 2013 at 19:13 UTC | |
|
Re: use of uninitialized value in array
by Cristoforo (Curate) on Aug 02, 2013 at 21:01 UTC | |
|
Re: use of uninitialized value in array
by BillKSmith (Monsignor) on Aug 02, 2013 at 19:41 UTC |