What I'm trying to do is to create a program that reads through a
certain directory and outputs the location of each file(both in the
directory and subdirectorys) into a text file. I am completely new to
Perl and under a time restriction so any help would be greatly
appreciated...thanks in advance

I create the following script:

[code]
use strict;
use File::Find;

sub eachFile {

 my $filename = $_;

 my $fullpath = $File::Find::name;

 #remember that File::Find changes your CWD,

 #so you can call open with just $_


  if (-e $filename) {

  print "$filename exists!"

     . " The full name is $fullpath\n";

  }
}

find (\&eachFile, "mydir/");

[/code]

Is this correct? Additionally I wanted the script to run on an hourly
basis to reupdate...how is this possible?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to