I suspect you want something like this:
use strict; open my $ALUS, "Z:\\3\' UTR intron project\\Alu_bed.bed" or die "Coul +dn't open alus: $!"; my %seen; while (<$ALUS>){ /(chr.*?)\t/ or next; if (! exists $seen{$1}){ open my $fh, ">", "Z:\\3\' UTR intron project\\Alu_chroms\\$1.tx +t"||die "couldn't open $1 file!"; $seen{$1} = $fh; } print {$seen{$1}} "$_"; }
In reply to Re: varaible to filehandle -alack!
by Crackers2
in thread varaible to filehandle -alack!
by maayanster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |