develooper Front page | perl.beginners | Postings from January 2002

perl sandbox creation

Thread Next
From:
garrett esperum
Date:
January 9, 2002 22:53
Subject:
perl sandbox creation
Message ID:
F82HbMPcAKlfpJ6Xagp00016f3b@hotmail.com
Hello all,

Here is my environment:
solaris 2.6
perl 5.6.1

Here are descriptions of the files I am working with:
1) a meta-data text file
2) a creation.pl file
3) a CVS repository

The meta-data file contains information about multiple CVS repository files. 
There are hundreds of rows with six columns each in the meta-data file. Each 
file in the repository basically has it's own row of information. The rows 
columns are as follows:
Column 1 = file name
Column 2 = file type
Column 3 = file location
Column 4 = file owner
Column 5 = file permissions
Column 6 = currently unused optional column
These columns are seperated by a single tab.

Example row:
foo.html html /one/two/three/four haxor 0755

I want to execute the creation.pl file to read the meta-data file and create 
a "sandbox" from the meta-data information. I need help with the following 
tasks:

1) How do I process each column of every row? How do I grab one row, split 
it up at every tab, and copy the correct file into it's correct directory 
with its correct permissions?

2) How do I create variables for each piece of the split row? Like how do I 
create a variable for the directory path column and then go and create that 
directory path from that variable if it doesn't already exist?

3)How do I grab the files out of CVS and write them to a temp directory?

4)How do I do all of this in a loop for every row of the meta-data file?

I am very appreciative for your help! Thank You!!

-garrett

_________________________________________________________________
Join the worldÂ’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About