# example 1 my $flag = 0; while() { next unless $flag or m/^\d+\.\d+/; print; $flag ^= 1; } # example 2 depends on newline before Prototype section # using input record separtator to do the work $/ = "\n\n"; while() { print if m/^\d+\.\d+\./; } # example 3 one of many possible REs local $/; $data = ; @chunks = $data =~ m/^(\d+\.\d+\.[^\n]+\n[^\n]+\n)/gm; print @chunks; # example 4 yet another way to do it (LIKE YOUR ORIGINAL) local $/; $data = ; @chunks = $data =~ m/(^\d+\.\d+\..*?(?=Prototype:))/gsm; print @chunks; __DATA__ 5.1. GetTagBytestoWrite This function returns the number of bytes taken by the Tag of the ASN object. It Scans through the BER/DER encoded String and finds the no of bytes taken by the Tag of a given ASN.1 Object. Prototype: int GetTagbytestoWrite(unsigned char *tstr,int *count) Parameters: *tstr Contents of the ASN.1 Object in a string *count a pointer to an integer to hold the address of the variable holding the number of bytes the tag value takes to store itself. 5.2. GetLenBytestoWrite This function returns the no of Octets taken by the Length field of a given ASN.1 Object. It Scans through the BER/DER encoded String and finds the no of bytes taken by the Length field of a given ASN.1 Object. Prototype: int GetLenbytestoWrite(unsigned char *pstr,int *count) Parameters: *pstr Contents ..