You are using
GetOptions
at one place and access command line arguments via
$ARGV
at other places. When using
GetOptions
, all matching arguments are removed from
$ARGV[]
.
So when executing the script with
./generate.pl -prjroot "/home/rpsa/EMO/ct_space" -outdir "/home/rpsa/output" -mapfile "/home/rpsa/EMO/mapfile.txt"
there will be only
$ARGV[0]
left (the executed command).
Solution:
Replace all usages of
$ARGV[]
by the matching variables set by
GetOptions
.