If I do this:
GetOptions( 'u=s' => \$in_username, 'r=i' => \$in_readonly, 'b=i' => \$in_backup ); exit usage() unless $in_username && $in_readonly && $in_backup;
and call the program as follows:
./app.pl -u david -r 12 -b 0
this always leads to a call to use (), so it is obvious that 0 is not considered an integer value. What can I accept integer values ββAND 0?
integer parameters perl zero getopt-long
David
source share