in reply to better cli processing
You may want to take a look at Getopt::Long and Getopt::Std. These modules come with perl, and should make the parsing of your command line arguments a snap.
--SparkeyG
--SparkeyG
In Section
Seekers of Perl Wisdom