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";
In reply to Re^4: Show different text based on random number
by htmanning
in thread Show different text based on random number
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |