FreeBSD.software
Home/devel/p5-File-Random

p5-File-Random

0.21devel

Perl module for random selecting of a file

This module simplifies the routine job of selecting a random file. (As you can find at CGI scripts). It's done, because it's boring (and error prone), always to write something like my @files = (<*.*>); my $randf = $files[rand @files]; or opendir DIR, " ... " or die " ... "; my @files = grep {-f ...} (readdir DIR); closedir DIR; my $randf = $files[rand @files]; It also becomes very boring and very dangerous to write randomly selection for subdirectory searching with special check-routines. The simple standard job of selecting a random line from a file is implemented, too.

$pkg install p5-File-Random
metacpan.org/release/File-Random
Origin
devel/p5-File-Random
Size
22.6KiB
License
ART10, GPLv1+
Maintainer
bofh@FreeBSD.org
Dependencies
3 packages
Required by
0 packages

Dependencies (3)