Carlos,
This script should do the trick...It reads from standard input (I tested it under Windows NT)
so you will need to open a file and change the while line.
#!perl -w
$ctr = 1;
$freq = 5;
while(<>) {
unless ($ctr++ % $freq) { print "$_"; }
}
> Does anyone have a quickie perl script that will read a file
> and write out
> every nth record??
>
> Carlos
>
> P.S. I am diligently looking this up in my "Perl by Example"
> book as well.
>
>
> ===== Want to unsubscribe from this list?
> ===== Send mail with body "unsubscribe" to macperl-request@macperl.org
>