in reply to Comparing array of aligned sequences
use Data::Dumper; print Dumper(\@arr)
Arrays in Perl start with index=0 by default, but you start filling the array at index=1. Maybe you want $seqcount++; at the end of your while loop?
If you just want your input file in an array-of-arrays (perldoc perdsc), this is simpler:
my @arr; open (B, "temp.dat"); while (my $line=<B>) { chomp $line; $line =~ s/\s//g; my @temp = split //, $line; push @arr, [@temp]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Comparing array of aligned sequences
by newtoperlprog (Sexton) on Jul 11, 2014 at 17:05 UTC |