in reply to command line variables

You can use a module like Getopt::Std or Getopt::Long, or you can use the -s switch to Perl, and run your program as perl -s program.pl -u=foo -p=bar, which will set $main::u to "foo" and $main::p to "bar".