[EMAIL PROTECTED] wrote:
Here's a snippet of my tree:

|-- PresidentialSeatingP4
|   |-- 702
|   |   |-- Photos
|   |   |-- Templates
|   |   `-- models
|   |       |-- Fabrics
|   |       `-- Frames
|   `-- Database
|-- PrimoInternationalP4
|   |-- 703
|   |   |-- Photos
|   |   |-- Templates
|   |   `-- models
|   |       |-- Fabrics
|   |       `-- Frames
|   `-- Database
|-- PrivilegeInternationalP4
|   |-- 704
|   |   |-- Photos
|   |   |-- Templates
|   |   `-- models
|   |       |-- Fabrics
|   |       `-- Frames
|   `-- Database

Each folder name that ends in "P4" is a top level folder. Inside of of
those there will always be two folders; one called Database and the
other will be a 3 digit number, such as 702, 703, or 704 in this case.

The mission:
I need to write the name of the number folder to a file.  The filename
must be PREVUE2.CFG.  The file must be located inside the folder by
which it got it's name.


for my $path ( <*P4/[0-9][0-9][0-9]> ) {
    open my $fh, '>', "$path/PREVUE2.CFG"
        or die "Cannot open '$path/PREVUE2.CFG' $!";
    print $fh $path;
    }



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

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


Reply via email to