SPUG: A more complicated question
shamonsflame at hotmail.com
Thu Jan 10 13:42:29 CST 2002
Ok, here is a little harder question.
Descriptions of the files I am working with:
1) a meta-data text file
2) a creation.pl file
The meta-data file contains information about multiple data files. There are
hundreds of rows with six columns each in the meta-data file. Each file has
it's own row of meta information. A rows column is 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.
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 "mirrored file environment" 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?
You all have been very helpful! Thank You!
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/
More information about the spug-list