I'd make a function that does the split and process and then call that function for both this and argv.spec. DRYer code