diff options
Diffstat (limited to 'devel/p5-File-Random/pkg-descr')
-rw-r--r-- | devel/p5-File-Random/pkg-descr | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/devel/p5-File-Random/pkg-descr b/devel/p5-File-Random/pkg-descr new file mode 100644 index 000000000000..4d7fe2cf84a8 --- /dev/null +++ b/devel/p5-File-Random/pkg-descr @@ -0,0 +1,23 @@ +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 +errorprone), 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. + +WWW: http://search.cpan.org/dist/File-Random/ +Author: Janek Schleicher <bigj@kamelfreund.de> + +- Aaron Dalton +aaron@daltons.ca |