in reply to grep -A10 oneliner?
perl -lne '$c=11if/pattern/;$c--,print if$c' file [download]
FORE!: Removed unneeded space between if $c.