develooper Front page | perl.beginners | Postings from May 2003

count of words (fields) after "split"

Thread Next
From:
Richard Müller
Date:
May 31, 2003 11:04
Subject:
count of words (fields) after "split"
Message ID:
3ED8EEAC.2030800@oeko-sorpe.de
Hi,
I'm a very newbie with perl. I have a text file and want to read it line
by line and split it into words:
my @fields = split / /, $_;
- so far no problem.
Now I have to count the words in the line. This I could not achieve.
I#m sure it is very simple - but I did not find the suitable command
-- 
Richard Müller - Am Spring 9 - D-58802 Balve
r.mueller@oeko-sorpe.de - www.oeko-sorpe.de



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About