Hi,lists,

I have a file that look as:

--
User: honorhr40
Got data from YY23 (md1=23,md2=24):
[0] xxxx=46[I:0 T:Int]
[1] pd=[I:0 T:Str]
[2] cosnm=normal[I:0 T:Str]
--
User: lulu-918
Got data from YY18 (md1=18,md2=19):
[0] xxxx=69[I:0 T:Int]
[1] pd=back.zzz.com[I:0 T:Str]
[2] cosnm=normal[I:0 T:Str]

......

and thousands of these lines.

I want to get the No.1 line and No.5 line,just as:

User: honorhr40
[2] cosnm=normal[I:0 T:Str]

and put the two lines into a hash,as:

$hash{'honorhr40'} = 'normal';

I have no ideas on doing this work.Can you anyone give me some help?thanks.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to