TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:14107] Need help with Perl program



This sounds like a classic recursion scenario.

Tom Veldhouse
veldy@visi.com

----- Original Message ----- 
From: "Mike Glaser" <jurupari@geocities.com>
To: <tclug-list@listserv.real-time.com>
Sent: Saturday, February 26, 2000 6:42 PM
Subject: [TCLUG:14107] Need help with Perl program


> I am trying to learn Perl and I am having trouble solving what I 
> would think should be a simple problem.
> 
> What I would like to do is create an array that has in it all of the 
> files in a directory and its subdirectories. To put it another way, I 
> am looking for the output of 'ls -R' placed into an array more or 
> less.
> 
> What I hope to do is write a program that asks for a search string, a 
> replacement string, and a starting directory name; then it goes 
> through every *.html file starting in the given directory and 
> performs the substitution if it matches the search string. I have the 
> program working on a single directory now, but I want it to go 
> through the subdirectories and update all the files belonging to a 
> web site.
> 
> I have used the O'Reilly books 'Learning Perl' and 'Perl Cookbook' to 
> get me to this point, but I don't understand the module 'File::find' 
> well enough to solve my problem, and I think that is what I would 
> need to use.
> 
> Any help / sample coude would be appreciated.
> 
> Thanks,
> Mike Glaser
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
>