#!/usr/bin/perl -w
use strict;

use Futils;
my($futils)    = Futils->new();
my($directory) = './';
my($target)    = q[index.html];
my($content)   = '';
my(@files)     =
   $futils->list_dir
      (
         $directory,
         '--files-only',
         '--with-paths',
         '--follow',
         '--no-fsdots',
      );

foreach (@files) {

   if ($futils->strip_path($_) eq $target) {

      $content = $futils->load_file($_);

      last;
   }
}

if ($content) {

   # ...do something with the file contents
   print($content);
}
else {

   # ...do something without content ;O)
   print
      (
         qq["$target" not found in "$directory" or its subdirectories.\n\n],
         qq[Directory "$directory" contains:\n],
         join(qq[\n],@files),
         qq[\n\n]
      );
}

=pod

   AUTHOR
      Tommy Butler <tommy @ atrixnet.com>
      phone: (817)-468-7716
      6711 Forest Park Dr
      Arlington, TX
           76001-8403

   COPYRIGHT   Tommy Butler. All rights reserved
   LISCENCE    This software is free, use/distribute under the GNU GPL.
   BUGS TO     Tommy Butler <perlmod @ atrixnet.com>

   This code uses Futils, a Perl module (or reusable code library) to make life
   easier when doing things with files.  You can download the code at:
   <http://ooopps.sourceforge.net/cgi-bin/archive.pl/pub/modules/Futils.pm>

   Futils uses other modules, which may be also be found here at the
   ooOPps Open Source Code Library under the "modules" section.  Refer to the
   itemized list below for more specific information:

      "Handy::Dandy"
         used by:    Futils
         file name   Dandy.pm
         get it at: /pub/modules/Handy/Dandy.pm

      "OOorNo"
         used by:    Futils, Handy::Dandy
         file name:  OOorNo.pm
         get it at: /pub/modules/OOorNo.pm

      "Handy::Dandy::TimeTools"
         used by:    Handy::Dandy
         file name:  TimeTools.pm
         get it at: /pub/modules/Handy/Dandy/TimeTools.pm

=cut