loop does select next line

2014-07-05 Thread Sunita Pradhan
I have a set of code for count number of lines and number of words . #!/usr/bin/perl while ($line = STDIN){ chomp ($line); $hash{L_c_start}++ if ($line =~ /^C.*/i); @words = split /\s+/,$line; foreach $c (keys @words){ print word $words[$c]\n;

Re: loop does select next line

2014-07-05 Thread Kent Fredric
On 6 July 2014 02:31, Sunita Pradhan sunita.pradhan.2...@hotmail.com wrote: I have a set of code for count number of lines and number of words . #!/usr/bin/perl while ($line = STDIN){ chomp ($line); $hash{L_c_start}++ if ($line =~ /^C.*/i); @words = split