in reply to Re: Re: Unique Variable names...
in thread Unique Variable names...
OK, now we're talking.
Assuming you want a result which is first the AFFX-BioB-xxx_at-identifier, followed by all signal-data which are connected to this identifier, I suggest:
After having run this sub over all your files you will find in %outputdata a nicely ordered (per identifier) structure of your signal-data.while (@filename) { my $i; $file=shift @filename; use Cwd 'chdir'; chdir "./data"; open (FILE, "$file") or die; while (<FILE>) { next while $i++ <= 14; (my $id, undef, undef, my $signal, undef, undef)=split(/\t +/); push @{$outputdata{$id}}, $signal; } close (FILE); }
Of course you can print it to a filehandle. This is a format which is suitable to be imported in a database or a spreadsheet.for $id (keys %outputdata) { print "$id:\t",(join("\t",@{$outputdata{$id}})),"\n"; }
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|