in reply to Passing C++ variable into Perl in command line
Does this help? Parsing your script's command line