use PIR; my $iter = PIR->new->file->iter($somedir); while (defined(my $file = $iter->())) { next if int rand 10; print $file, "\n"; }