Re: Taking Multiple Files in Pairs and Run it Iteratively

2005-03-17 Thread John W. Krahn
Edward Wijaya wrote: On Tue, 15 Mar 2005 02:29:06 +0800, John W. Krahn <[EMAIL PROTECTED]> wrote: Edward Wijaya wrote: [snip] Here is one way to do it: my %files; for ( @ARGV ) { next unless /(.+)\.(?:fa|rs)$/; push @{ $files{ $1 } }, $_; } for my $base ( keys %files ) { if ( @{

Re: Taking Multiple Files in Pairs and Run it Iteratively

2005-03-17 Thread Edward Wijaya
On Tue, 15 Mar 2005 02:29:06 +0800, John W. Krahn <[EMAIL PROTECTED]> wrote: Edward Wijaya wrote: [snip] Here is one way to do it: my %files; for ( @ARGV ) { next unless /(.+)\.(?:fa|rs)$/; push @{ $files{ $1 } }, $_; } for my $base ( keys %files ) { if ( @{ $files{ $base } } !

Re: Taking Multiple Files in Pairs and Run it Iteratively

2005-03-14 Thread John W. Krahn
Edward Wijaya wrote: Hi, Hello, Suppose I have a pair-series of files as follows: data1.fa data1.rs data2.fa data2.rs #say each of this file contain lines of numbers #and there are 40 of files And I have a code that take two files that ends with *.fa and *.rs $ perl mycode.pl data1.fa dat

Re: Taking Multiple Files in Pairs and Run it Iteratively

2005-03-13 Thread Randy W. Sims
Edward Wijaya wrote: How can I make my code above such that it can take all multiple files iteratively? When possible try to use the data and throw it away as soon as possible to avoid high memory usage. For example, your version reads all of both files in to arrays, then creates another array

Re: Taking Multiple Files in Pairs and Run it Iteratively

2005-03-13 Thread Harald Ashburner
On Sun, 13 Mar 2005 18:38:42 +0800, Edward Wijaya <[EMAIL PROTECTED]> wrote: > Hi, > > Suppose I have a pair-series of files as follows: > > data1.fa > data1.rs > data2.fa > data2.rs #say each of this file contain lines of numbers > #and there are 40 of files > > And I have a code that

Taking Multiple Files in Pairs and Run it Iteratively

2005-03-13 Thread Edward Wijaya
Hi, Suppose I have a pair-series of files as follows: data1.fa data1.rs data2.fa data2.rs #say each of this file contain lines of numbers #and there are 40 of files And I have a code that take two files that ends with *.fa and *.rs $ perl mycode.pl data1.fa data1.rs $ perl mycode.pl data2