Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: renaming 1000's of FASTA files

by Cristoforo (Deacon)
on Jul 11, 2011 at 16:53 UTC ( #913728=note: print w/replies, xml ) Need Help??

in reply to renaming 1000's of FASTA files

The script puts all the lines from the .txt file in a hash

It just keeps creating a new 1 element hash

%seq_id = ("$fasta_id" => "$_");

you would need to say instead
$seq_id{ $fasta_id } = $_;

However, moritz has shown the better solution (instead of reopening the file over and over).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://913728]
[TStanley]: talexb I was actually in your area last week. I was working in Milton, Ontario at the hospital they are building there.
Eily hasn't entered monk school
[Eily]: there are some special array variables that are not interpolated in double strings, like @*, @/, @(, and @)
[Eily]: is this documented somwhere?
[Eily]: "@{/}" does interpolate @/ though
[Eily]: (while the same for @*, @(, and @) throw a warning)

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2017-06-23 13:57 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (547 votes). Check out past polls.