or download this
my @files = glob "$ENV{'DOCUMENT_ROOT'}/data/text/*.txt";
my @display_files = map m{([^/]+)\.txt}, @files;
...
unless ( grep { $_ eq param('select') } @display_files )
#If User Selection doesn't match one of the passages then its a F
+raud!
{ ...