in reply to one liner truncate beginning at line with keyword

perl -pi -e " exit if /#vgc config/"  /etc/rc.local

The above works perfectly. Thank you PERL monks.