in reply to Paste comments in a document

A variation.

#! perl -sw use strict; my %comments = ( FED00123 => 'Comment FED00123', FED00124 => 'Comment FED00124', ); $/ = 'UNIX'; ## Read the bulk as a block while( <DATA> ) { my( $id ) = m[(FED.....)]; print; { local $/ = "\n"; print scalar <DATA>; } ## tidy up print "\n$comments{ $id }\n"; } __DATA__ ...

Gives:

C:\test>junk48 =====EDO=FED00123===== XXXXX XXXXX XXXXX XXXXX XXXXX UNIX Page: XX Comment FED00123 =====EDO=FED00124===== XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX UNIX Page: XX Comment FED00124

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"