devel/p5-File-Random 0.21 DragonFly
Perl module for random selecting of a file
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- ART10, GPLv1+
- Categories
- devel, perl5
- Package size
- 12.3 KiB, 22.8 KiB installed
Description
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.
In the other systems
| System | Port | Version |
|---|---|---|
| DragonFly | devel/p5-File-Random | 0.21 |
| FreeBSD | devel/p5-File-Random | 0.21 |
Install
Binary package:
pkg install p5-File-Random
From DPorts:
cd /usr/dports/devel/p5-File-Random && make install clean
Dependencies
Run dependencies 3
No port depends on this one.