How can find a specific number in a text block and print the complete text block beginning with the key word \"BEGIN\" and ending with \"
\"BEGIN\"
\"
perl -lne 'if(/56789/){$f=1} push @a,$_; if(/END/){ if($f){print join "\n",@a} undef @a;$f=0}' your_file