Dear Sir This is sample of my data. I need to extract the yellow color column. http://rapidshare.de/files/39766858/cluster1.xls.html Regards
Fadhl M. Al-Akwaa Biomedical Engineering, PhD Student --- On Wed, 6/18/08, Chas. Owens <[EMAIL PROTECTED]> wrote: From: Chas. Owens <[EMAIL PROTECTED]> Subject: Re: how I extract text information? To: [EMAIL PROTECTED] Cc: beginners@perl.org Date: Wednesday, June 18, 2008, 8:18 PM On Wed, Jun 18, 2008 at 22:52, Eng. Fadhl Al_Akwaa <[EMAIL PROTECTED]> wrote: > > > Dear Sir > I am beginner with perl and I read many things to do what I want. > I have a text file and I want to extract the column inside the text. the problem is that the lines is not length equal. > please how could I do it. > Regards > Fadhl M. Al-Akwaa Biomedical Engineering, PhD Student If your data has a column separator that does not occur inside of the fields it can be is as simple as: #!/usr/bin/perl use strict; use warnings; my $separator = " "; while (<>) { my @fields = split $separator; print "$fields[3]\n"; #print the fourth field } You can then run it like this: perl example_script.pl file_to_extract_field_from.txt You might find the following documentation useful: http://perldoc.perl.org/functions/split.html http://perldoc.perl.org/perlsyn.html http://perldoc.perl.org/perlfunc.html http://perldoc.perl.org/perlop.html http://perldoc.perl.org/perlretut.html http://perldoc.perl.org/perlre.html -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read.