hgraf has asked for the wisdom of the Perl Monks concerning the following question:
Now, what I need it to do is, add more strings. I need two extra strings. 1st- What does ($line =~ /^>(\S+)\s*(.*)/ ) is exactly doing? 2nd- How can add more $ to it, such as acession numbers? thanks!!#!/usr/bin/perl use warnings; while (defined($line = <>)) { chomp( $line ); if ($line =~ /^>(\S+)\s*(.*)/ ) { $id = $1; $description = $2; print "id = $id\n"; print "description = $description\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: some bioinformatics
by anneli (Pilgrim) on Oct 01, 2011 at 05:02 UTC | |
|
Re: some bioinformatics
by Marshall (Canon) on Oct 01, 2011 at 05:47 UTC | |
|
Re: some bioinformatics
by Cristoforo (Curate) on Oct 01, 2011 at 20:04 UTC | |
|
Re: some bioinformatics
by pvaldes (Chaplain) on Oct 01, 2011 at 08:55 UTC | |
|
Re: some bioinformatics
by Anonymous Monk on Oct 01, 2011 at 02:33 UTC | |
|
Re: some bioinformatics
by Anonymous Monk on Oct 01, 2011 at 02:06 UTC |