Here is the code
open IN, '</root/Desktop/out.txt' or die "Cannot open file : $!";
while (<IN>) {
chomp $_;
$seq_no= $_;
my @this_seq=();
if($seq_no=~ m/^complement\(/){
push(@this_seq,1);
$seq_no=~ s/complement\(//g;
if($seq_no=~ m/^order/){
push(@this_seq,2);
$seq_no=~ s/order//g;
$seq_no=~ s/\(//g;
$seq_no=~ s/\)//g;
#my @temp = split(/,/, $seq_no);
push @this_seq,$seq_no;
print "@this_seq \n";
}
}
else
{
$seq_no=~ s/\(//g;
$seq_no=~ s/\)//g;
push @this_seq,$seq_no;
#print "@this_seq \n";
}
push @sequence,\@this_seq;
}
print @sequence;
The out file is
complement(order(1843..1881,1923..2001,2065..2147, 2216..2277,2330..2468))
773..1447
But when i print @sequence it just get
ARRAY(0x119adb8)ARRAY(0x117e6b0)
I have already add \@this_seq when push into array, but it still shows memory address, can anyone tell me how to change it to shows array content.
while( my $seq_no = <IN> ){ chomp $seq_no; ...since you don't otherwise use$_.