in reply to Re^3: Show different text based on random number
in thread Show different text based on random number
use Path::Tiny; my @choices = ( path('/usr/home/test/public_html/front-one.txt'), path('/usr/home/test/public_html/front-two.txt'), path('/usr/home/test/public_html/front-three.txt'), ); my $random_path = $choices[rand scalar @choices]; my $text = $random_path->slurp; print "$text";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Show different text based on random number
by kevbot (Vicar) on Apr 22, 2016 at 06:01 UTC | |
by htmanning (Friar) on Apr 22, 2016 at 06:02 UTC | |
by beech (Parson) on Apr 22, 2016 at 06:21 UTC |