concatenate files recursively in win32

M

Mike James

I admit it. I'm a newbie...

I want to concatenate a series of text files by recursively going down a
folder hierarchy. All the files have the same extension (*.txt) and I'm
running WinXP Home with ActiveState Perl v5.6.1

Any help will be much appreciated.

regards, Mike
 
J

Jim Gibson

Mike James said:
I admit it. I'm a newbie...

I want to concatenate a series of text files by recursively going down a
folder hierarchy. All the files have the same extension (*.txt) and I'm
running WinXP Home with ActiveState Perl v5.6.1

Any help will be much appreciated.

regards, Mike

Check out the module File::Find (I have not used it, but it should
enable you to do what you want.) If you don't have that, or can't
figure out how to use it (it uses subroution references, which can make
it complicated for a beginner), then check out the opendir, readdir,
and closedir functions, and file test operators.

If you have perldoc installed:

perldoc File::Find
perldoc -f opendir
perldoc -f readdir
perldoc perlfunc <- search for "file test" or "Alphabetical
Listing of Perl Functions"


FYI: this newsgroup is defunct. Try comp.land.perl.misc in the future.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top