user-pic

菜鸟求助高手

Vote 0 Votes

那位高手能帮忙下面问题,有报酬。联系我:shangyida@gmail.com

Use pico to create a UNIX file in your bin directory called accessions containing just a list of simple accession numbers separated by carriage returns (and nothing else!) e.g.
A10369
X45345
P12353
M15668
Z89376

Write a Perl program to open a file from the command line, read each line of the accessions file, add a .seq suffix to every accession number, and write the resulting “accession.seq” out to a new file ending with the suffix .list (e.g. accessions.list). The contents of the new file will look like this:
A10369.seq
X45345.seq
P12353.seq
M15668.seq
Z89376.seq

To get a filename from the command line (e.g. perl Q2.pl accessions), you simply shift()the first element of the @ARGV default array. This is so common that you do not even have to write @ARGV; just do:  $filename = shift;
$filename should now contain the “accessions” file name.

Show BOTH source code and the accessions.list file.

Add a Reply

Forum Groups

Good Perl Books

Perl 學習手札

作者:簡信昌

Perl 學習手札 , 一本优秀的中文Perl在线学习资料。

Perl 程序讨论区

12 50

Last Topic: [注意]本区文章归档区 by 路杨 on Oct 16, 2006

事物处理及其他

113 1410

Last Topic: 踩个脚印 by 眼睛oo on Dec 4, 2010

测试私密区

测试私密区

18 88

Notice: 用于测试程序或者不可告人之秘密。不要问我要密码哦。。[此为原LB_ES论坛系统保留项,只限原有权限朋友进入,不再接受注册]

OpenID accepted here Learn more about OpenID