non copy solution using invention to emulate perl c option