in reply to Need help modifying parse program.

I'm not even going to try reading through those regex. Why not make things simpler and do something more like:
use strict; use warnings; my %d; while (<DATA>) { if (m/^Primary \(Reporting\) Cp:/) { ($d{'cp'}) = m/Cp: (\d+)/s; ($d{'set'}) = m/Set: (\d+)/s; ($d{'car'}) = m/Car: (\d+)/s; print "Cp:$d{'cp'} - Set:$d{'set'} - Car:$d{'car'}\n"; } elsif (m/^Missing P:/) { ($d{'keep'}) = m/Keep: (\d+)/s; ($d{'phase'}) = m/Phase: (\w+)/s; ($d{'strength'}) = m/Strength: (\d+)/s; print "Phase:$d{'phase'} - Strength:$d{'strength'}\n"; } elsif (m/Secondary Sector Information:/) { print "Keep:$d{'keep'} - Phase:$d{'phase'} - Strength:$d{'stre +ngth'}\n"; } elsif (m/^Slot/) { ($d{'keep'}) = m/Keep: (\d+)/s; ($d{'offset'}) = m/Offset: (\w+)/s; ($d{'strength'}) = m/Strength: (\d+)/s; print "Keep:$d{'keep'} - Pn_offset:$d{'phase'} - Strength:$d{' +strength'}\n"; } elsif (m/^={68}/) { %d = (); print '-'x30, "\n"; } } print '-'x30, "\n"; __DATA__ ==================================================================== Record: 9851329 Version: 2 Timestamp: Sat Feb 11 22:39:43 2006 Primary (Reporting) Cp: 113 Set: 2 Car: 1 Ref: yes Event: 9922 Missing P: Keep: 1 Phase: 0x2fdf Strength: 24 Secondary Sector Information: ==================================================================== Record: 9851330 Version: 2 Timestamp: Sat Feb 11 22:39:43 2006 Primary (Reporting) Cp: 115 Set: 1 Car: 2 Ref: yes Event: 9923 Missing P: Keep: 1 Phase: 0x7d10 Strength: 31 Secondary Sector Information: Slot 1: Keep: 1 offset: 391 Strength: 27 Ref: no Slot 2: Keep: 1 offset: 325 Strength: 38 Ref: no