yunfei has asked for the wisdom of the Perl Monks concerning the following question:
The code for reading file names is (file path is added thereafter by $file="$dir/$file";)[13:06 yunfei@bcl code]$ cat -T -E ../src/db_names | grep "hg18ibwa" $g18ibwa^Iindex_bwa_human_b36_both.fasta.tar.gz^Iindex_bwa_human_b36_b +oth.fasta.index.tar.gz.md5
Also when I try102 while(<DBNAME>) { 103 next if /^#/; 104 1 while (chomp); 105 s/ +/\t/g; 106 s/\t+/\t/g; 107 my @tmp=split('\t',$_); 108 my $item=shift @tmp; 109 $down_name{$item}=\@tmp; 110 }
I only got output from line 132 but never from line 135. Any idea what's wrong here? Thank you very much! I'm new to this place, hope I'm asking the question at the right place.130 if ($file =~/(zip$)|(gz$)|(tar$)|(bz$)|(bz +2$)/i) { 131 $untar{$file}=$untar_dir; 132 print STDERR "Got $file another ta +r file\n"; 133 } elsif ($file =~/md5$/i) { 134 my ($source_file)= $file=~/(.*)\.m +d5$/i; 135 print STDERR "Source file $source_ +file\n"; 136 }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: weird print output
by kcott (Archbishop) on Sep 30, 2012 at 21:07 UTC | |
|
Re: weird print output
by jwkrahn (Abbot) on Oct 01, 2012 at 00:32 UTC |