B
Bryan
I have the following hash:
$VAR1 = {
'directory' => {
'name' => 'GLMSR',
'directory' => {
'A17' => {
'file' => {
'name' => 'A17.xml'
}
},
'F19' => {
'file' => {
'name' => 'F19.xml'
}
},
'B01' => {
'file' => {
'name' => 'B01.xml'
}
}
}
}
};
I need to iterate over this structure, and for each directory, check if
it exists in a new location- if it doesnt, create the directory on disk.
If the hash element is a file, then I need to do something specific
with the file, and then write out a new file to the corresponding directory.
So at the end, I would have a duplicate directory structure on disk,
which contains the processed files instead of the originals.
What is the appropriate way to do this?
Thanks,
B
$VAR1 = {
'directory' => {
'name' => 'GLMSR',
'directory' => {
'A17' => {
'file' => {
'name' => 'A17.xml'
}
},
'F19' => {
'file' => {
'name' => 'F19.xml'
}
},
'B01' => {
'file' => {
'name' => 'B01.xml'
}
}
}
}
};
I need to iterate over this structure, and for each directory, check if
it exists in a new location- if it doesnt, create the directory on disk.
If the hash element is a file, then I need to do something specific
with the file, and then write out a new file to the corresponding directory.
So at the end, I would have a duplicate directory structure on disk,
which contains the processed files instead of the originals.
What is the appropriate way to do this?
Thanks,
B