C_elegance has asked for the wisdom of the Perl Monks concerning the following question:
one of the columns has tells me whether it's a promoter (DNA data). i want to fish out all "promoters", match them to the name and sequence start and end description other columns so i can fish out the sequence from different file.use warnings; use strict; sub read_TABLE{ my($file_name)=@_; open (OPEN_TABLE,$file_name); if(open (OPEN_TABLE, $file_name)){ print "Can open file \"$file_name\" \n"; } unless(open(OPEN_TABLE, $file_name)){ print STDERR "Can't open file \"$file_name\" \n"; } my@table; while(my$line=<OPEN_TABLE>){ chomp$line; my@data=split(/\t/,$line,5); push@table,\@data; } close OPEN_TABLE; return @table; } my@s=&read_table("TABLE.txt"); foreach my$line(@s) { my$start=[0]; my$end=[1]; my$name=[2]; my$strand=[3]; my$type=[4]; print "$type\n"; }
what does it mean?? it looks like some sort of reference??Can open file "TABLE.txt" ARRAY(0x181ea88) ARRAY(0x181ea88) ARRAY(0x181ea88) ARRAY(0x181ea88) ARRAY(0x181ea88) ..... ARRAY(0x181ea88)
actually i've just tested whether it's a reference with
and yes, i getprint "@$type\n";
which means that i created a column called "type" full of 4s rather then an array of data from 5th column arrrrrrrCan open file "TABLE.txt" 4 4 4 4 etc
Since this morning i've tried other ways but still nothing, please help, i losing will to live or brewing a computer rage, i don't know what worst, one's sure i feel right idiot!!
Thank a million
x
|
|---|