add --core and --no-core option

This patch enable user to specify which corefile to use.
Points that I don't have confidence with are the name of the option 'no-core' and The first attempt to write perl :)
I'm appreciate if anyone have time and review it whether it acceptable or not.