[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Newbie on file processing...



On Fri, Aug 06, 1999 at 08:47:59AM +1000, Charles Cave wrote:
> 
> #!perl -w
> $ctr = 1;
> $freq = 5; 
> while(<>) {
>   unless ($ctr++ % $freq) { print "$_"; }
> }
> 

I recommend using the special variable $. instead of duplicating the line
count in another variable.

Ronald

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org