Well more design help. I've spent the last few hrs going through a text file. I'd like to be able to parse it. Below is a small sampling of the data I start with in the file. The blue text is specifically what I am interested in. There are several lines of this in a given file. Once I get this info then I search for it elswhere in the file and depending on the results of that search I want to spit out a formatted .csv file for Excel to read.
I am thinking do the intial search and stuff each line into an array. Once the array is built I then traverse it and search elsewwhere in the file for those values. I can do this most easily in Perl - I'd have to dust off my books though. Can I allocate a dynamic array in Perl or would I first need to do a line count, then build the array and then reread to stuff the lines in?
Type Pid COS PortName NodeName
N 140900; 3;50:05:07:68:01:10:2d:fa;50:05:07:68:01:00:2d:fa;
FC4s: FCP
Fabric Port Name: 20:09:00:05:1e:36:11:48
Permanent Port Name: 50:05:07:68:01:10:2d:fa
Device type: Physical Target
I am thinking do the intial search and stuff each line into an array. Once the array is built I then traverse it and search elsewwhere in the file for those values. I can do this most easily in Perl - I'd have to dust off my books though. Can I allocate a dynamic array in Perl or would I first need to do a line count, then build the array and then reread to stuff the lines in?
Type Pid COS PortName NodeName
N 140900; 3;50:05:07:68:01:10:2d:fa;50:05:07:68:01:00:2d:fa;
FC4s: FCP
Fabric Port Name: 20:09:00:05:1e:36:11:48
Permanent Port Name: 50:05:07:68:01:10:2d:fa
Device type: Physical Target

{7}([\da-f]{2}
){2}/g )
Comment