in reply to Variable Filehandles

Data and example results:

wfAtmInterfaceGroup.wfAtmCommonGroup

wfAtmInterfaceGroup.wfAtmLinkModuleGroup

wfAtmGroup.wfAtm

wfAtmGroup.wfAtm.wfAtmDelete

wfAtmInterfaceGroup.wfAtmCellSwitchGroup

The result would be

A file named "wfAtmInterfaceGroup.mib" would contain the text:

wfAtmInterfaceGroup.wfAtmCommonGroup

wfAtmInterfaceGroup.wfAtmLinkModuleGroup

wfAtmInterfaceGroup.wfAtmCellSwitchGroup

Another file named "wfAtmGroup.mib" would contain the text:

wfAtmGroup.wfAtm

wfAtmGroup.wfAtmDelete

NOTES: This program is a total hack to get around some badly written MIBs files. I'm not worried about overwriting filenames, since I'll just dump the new files into an empty directory, and if they have the same base stem I *want* them going into the same file (obviously, all files will be opened for appending).

Thanks for the help you have given so far, I'm going to go try out some of those solutions. No matter how many times I see it, I'm always amazed when a new post gets half a dozen answers in under an hour. Thanks for the help.

The guy who asked the question

Replies are listed 'Best First'.
RE: Re: Variable Filehandles
by Fastolfe (Vicar) on Nov 03, 2000 at 00:10 UTC
    It looks like the first code snippet in my first response does precisely what you're wanting.