On Mon, Jun 30, 2014 at 1:53 PM, Charles DeRykus <dery...@gmail.com> wrote: > On Mon, Jun 30, 2014 at 1:41 PM, Charles DeRykus <dery...@gmail.com> wrote: >> On Mon, Jun 30, 2014 at 11:57 AM, Sunita Pradhan >> <sunita.pradhan.2...@hotmail.com> wrote: >>> .... >> >> You could alter context, ie, change "if" to "while", to get the correct >> count: >> >> $c++ while $line =~ /\s\w+\s/g; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
$c++ while $line =~ /\s$w\s/g; -- Charles DeRykus -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/