francesca1987 has asked for the wisdom of the Perl Monks concerning the following question:
I have the following errors:open in, "rep_set_ass_tax.fna"; while ($line=<in>) { if($line=~/>/) { @vettore=split(/\s+/, $line); open my $fh, ">>seq_id.txt" or die "Cannot open output.txt: $!"; foreach (@vettore); print $_ . "\n"; close my $fh; } }
Who can help me?MacQIIME Mac-Pro-di-Francesca:cartella senza titolo $ perl taxa.pl syntax error at taxa.pl line 6, near ");" syntax error at taxa.pl line 8, near "$fh;"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: writing array element to a file
by hdb (Monsignor) on Apr 25, 2013 at 09:42 UTC | |
|
Re: writing array element to a file
by Random_Walk (Prior) on Apr 25, 2013 at 09:46 UTC | |
by francesca1987 (Initiate) on Apr 25, 2013 at 11:17 UTC | |
by Random_Walk (Prior) on Apr 25, 2013 at 13:11 UTC | |
by francesca1987 (Initiate) on Apr 25, 2013 at 13:22 UTC | |
by Random_Walk (Prior) on Apr 25, 2013 at 14:31 UTC | |
| |
|
Re: writing array element to a file
by baxy77bax (Deacon) on Apr 25, 2013 at 09:58 UTC | |
by francesca1987 (Initiate) on Apr 25, 2013 at 13:10 UTC | |
by poj (Abbot) on Apr 25, 2013 at 14:16 UTC |