The following crawls a directory and prints out random file names. Each file has a 1 in 10 chance of being selected.
use PIR; my $iter = PIR->new->file->iter($somedir); while (defined(my $file = $iter->())) { next if int rand 10; print $file, "\n"; }
In reply to Re^8: File::Random module (McA)
by tobyink
in thread File::Random module
by gautamparimoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |