Hello - I am trying to figure out how to convert an output file to a comma separated values file.
The original file is of this form: ***************************** foo ******************* thingA: 12 thingB: 23 thingC: 21 ==================== trial 1 ============= colA colB colC colD 1 23 28 273 227 2 237 2327 11 1 3 0 10 22 0 4 2 3 38 2 .etc ====================trial 2 ======== etc. My dilemma so basic - I know that when I open this file as <MYFILE> I can cycle through this program as While <MYFILE> but when I do this I have to cycle through everything at once and have a bunch of conditional statements. To get around this, my idea is to have a main loop with two subroutines: say FooSub and TrialSub. For the first I would split on ':' for the next I would split on '\s+'. But how do I skip a line? I want to get past the **** . . . line but if I use next to start the subroutine won't that create a loop that reads no lines - perhaps an ((if $_ !~ /^\*{1,5}/) {skip} would be best and just have each module end when it hits an '='. Can someone give me basic advice if I am going about this in the correct direction? I feel like I need a little nudge in the right direction before I try to make a potentially broken idea work. Thanks, Tim ____________________________________________________ Timothy B Booher, Lt USAF, AFRL/MNAC 101 West Eglin Blvd, Suite 339 Eglin AFB FL 32542-6810 Phone: 850-882-8302 Ext. 3360 (DSN 872-) FAX: 850-882-2201