in reply to How can I extract the expression between two key words
If the records are as fixed as they appear, substr or unpack would be better than matching a regular expression:
The unpack solution will trim trailing space, because of the "A" template, and is better if the text to capture has varying width. If 'SUBCASE' is not at fixed offset, index can find it to be used in the unpack template.# assume the current line is in $_ my $foo = substr $_, 5, 40; # or else my ($foo) = unpack "x5 A46", $_;
After Compline,
Zaxo
|
|---|