http://qs321.pair.com?node_id=1081250


in reply to Re^2: Use of uninitialized value $_ in string
in thread Use of uninitialized value $_ in string

... the script still does nothing.
[root@wsprod01 myperl]# ./test.pl --domain google.com --client google Usage: ./test.pl --domain companydomain.com --client company [--job-co +de 12345] [--help].

In the code shown in the OP, in the statement

GetOptions ( 'domain=s' => \$domain, 'client=s' => \$client, 'job-code:i' => \$job_code, 'help' => &usage() ) or &usage();
the  'help' key is given the value of whatever is returned by a call to the  usage() function. Problem is, this function returns nothing; rather, it calls die to print a usage message, so program execution will never get past the  GetOptions() function call. Is this what you intend?

Updates:

  1. If you want to assign the  'help' key a reference to the  usage() function,
        'help' => \&usage,
    would be the correct expression.
  2. Added italic emphasis in "... a call to the  usage() function."