Hi, please have a look to this perl  one line command.
perl -ne 'BEGIN{$/=">"}if(/^\s*(\S+)/){open(F,">$1")|| warn"$1 write
failed:$!\n";chomp;print F ">", $_}'


This command will  take a file like this:

>name1: anything
kdkdkkdkk
dkdkkdkdk
>name2: anything
slkslsksksl

and convert it into two files, named as  name1 and name2, and containing
the following information

>name1
kdkdkkdkk
dkdkkdkdk

in the file name1

>name2
slkslsksksl

in the file name2.

Here is the question, can anyone help me to decipher this one-line perl
command and put into a perl script.
Thanks for your help.

--
***************************************************************************
PEDRO a. RECHE gallardo, pHD            TL: 617 632 3824
Scientist, Mol.Immnunol.Foundation,     FX: 617 632 3351
Dana-Farber Cancer Institute,           EM: [EMAIL PROTECTED]
Harvard Medical School,                 URL: http://www.reche.org
44 Binney Street, D610C,
Boston, MA 02115
***************************************************************************


Reply via email to