I could simplify my problem as this. Is there perl function who could return the fourth column in this sample line:
16043 8.75E-07 1.00E-03 258 2157 cellular component organization and biogenesis YHR012W|YMR290C|YKR020W|YKL016C|YJL191W|YNL163C|YNL113W|YMR200W|YPL007C|YDL116W|YPR051W|YBL040C|YHR041C|YBR245C|YPL008W|YBR257W|YBR210W|YJL053W|YML012W|YLR025W|YGL246C|YKR060W|YDL043C|YCL059C|YFL048C|YER093C|YER083C|YPL145C|YNL079C|YKL173W|YNL175C|YDR168W|YDR449C|YBR109C|YPR131C|YDR485C|YOR279C|YPL204W|YHR191C|YOR191W|YFL039C|YMR049C|YPL232W|YDR448W|YJL140W|YKL018W|YKR002W|YPL047W|YML010W|YBR081C|YDR375C|YPL146C|YDR289C|YDL092W|YBR143C|YJR126C|YDR180W|YHR001W|YFL005W|YOR109W|YKR062W|YDR080W|YGR187C|YNL110C|YOL027C|YLR192C|YOR056C|YDR299W|YJL100W|YIL004C|YLL004W|YBR121C|YER148W|YLR086W|YLR191W|YLR291C|YBR035C|YLR229C|YPL212C|YLR186W|YFR041C|YDR456W|YNR038W|YLL034C|YMR308C|YBR066C|YLR401C|YPL129W|YNL325C|YOR098C|YPL085W|YDR082W|YDR424C|YDR392W|YLR166C|YBR162W-A|YOR265W|YDR477W|YJR066W|YMR294W|YJL069C|YOL144W|YBR238C|YJL039C|YDR212W|YBL028C|YDR329C|YGL106W|YER147C|YDR071C|YDL002C|YLL008W|YAL043C|YPR173C|YPR135W|YNR053C|YKL146W|YLR005W|YJL097W|YNL299W|YAL0 42W|YKL087C|YBR171W|YNR049C|YGR082W|YDR296W|YBR084W|YNL227C|YGR083C|YLR305C|YGR105W|YBR172C|YDR350C|YDR170C|YBR034C|YBR173C|YDR300C|YNL004W|YPR088C|YBR279W|YAL041W|YHR129C|YOR254C|YBR164C|YAL053W|YLR430W|YML032C|YOR201C|YLR425W|YMR211W|YDR414C|YGR042W|YGR029W|YNL329C|YER105C|YPL268W|YDR478W|YKL204W|YDL099W|YKL006C-A|YDR479C|YBL054W|YBL001C|YOR327C|YNL084C|YJR052W|YAL033W|YPR185W|YPR125W|YLR293C|YLR250W|YKR007W|YDR188W|YMR186W|YHR186C|YER114C|YCL011C|YLR095C|YNL047C|YDR466W|YOL147C|YNL031C|YNL041C|YDR524C|YJR075W|YHR073W|YLR114C|YNL243W|YBR123C|YPL226W|YMR235C|YBL084C|YNL029C|YKL191W|YER190W|YEL032W|YML046W|YOR304W|YOR089C|YAL011W|YBL006C|YOR061W|YJR105W|YBR198C|YML066C|YDL076C|YDR490C|YBR229C|YML105C|YOL139C|YKL190W|YMR162C|YOR132W|YDR260C|YLR222C|YER166W|YBR283C|YDL047W|YGL093W|YDR165W|YLR052W|YMR236W|YDR470C|YEL051W|YML104C|YDL143W|YNL220W|YGL112C|YDL077C|YML077W|YBL018C|YCL034W|YDL058W|YMR176W|YJL081C|YNL136W|YBR290W|YNL294C|YDR122W|YML103C|YOR160W|Y JL071W|YLR051C|YMR134W|YBL016W|YHL039W|YLR262C|YJL011C|YER068W|YDR244W|YMR022W|YNL147W|YKL139W|YDR388W|YOL010W|YAL029C|YJR017C|YNL097C 16043 8.75E-07 1.00E-03 258 2157 xxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyy how could I split the string value from number values. Regards Fadhl M. Al-Akwaa Biomedical Engineering, PhD Student --- On Fri, 6/20/08, Rob Dixon <[EMAIL PROTECTED]> wrote: From: Rob Dixon <[EMAIL PROTECTED]> Subject: Re: [Fwd: Re: how I extract text information?] To: "Perl Beginners" <beginners@perl.org> Cc: "Eng. Fadhl Al_Akwaa" <[EMAIL PROTECTED]> Date: Friday, June 20, 2008, 3:32 PM Fadhl M. Al-Akwaa wrote: > > Rob Dixon wrote: >> >> Fadhl M. Al-Akwaa wrote: >>> >>> no I show you the data in excell file to show you the desire column. >>> the data is text file. >> >> Then could you show us the text file please? > > but please note that the number of header lines is not equal. and the > data within each line > also is not equal. (Please bottom-post your replies and send them to the entire list, so that everyone can help you as well as benfit from the advice. Thank you.) I'm not clear exactly what you need, but this program reads lines from the file until it find the column header '# selected' somewhere in the line. After that it just prints the fourth column of data split on white space. You will something better than this if you need to access the later columns in the data though. HTH, Rob use strict; use warnings; open my $fh, '<', 'cluster1.bgo' or die $!; while (<$fh>) { last if /# selected/; } while (<$fh>) { my @data = split; print $data[3], "\n"; } **OUTPUT** 2 2 2 3 2 1 1 3 1