Of course this all completely and thoroughly described in the Getopt::Long documentation and I really think you should spend a bit more time reading it yourself than asking questions here, however it is quite simply really: GetOptions gets passed a hash describing the options for the program that are to be passed: the key is the option itself with an optional type and the value is a reference to a variable which will receive the value of the option. So in the case of the 'u=s' => \$user you have an option -u which is a string and who's value will be placed in the variable $user. The options are parsed and placed in the appropriate variables when GetOptions is called - this is why the module only requires the single function.
/J\
|