2fadfa2cfb
e-mail addresses from the pkg-descr file that could reasonably be mistaken for maintainer contact information in order to avoid confusion on the part of users looking for support. As a pleasant side effect this also avoids confusion and/or frustration for people who are no longer maintaining those ports.
19 lines
648 B
Text
19 lines
648 B
Text
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.
|
|
|
|
WWW: http://search.cpan.org/dist/File-Random/
|