in reply to splitting command-line arguments

What you want is GetOpt::Long. It will handle all your command line option needs.