Running perl script and getting "Error in option spec:"

I am very new to running perl scripts and I am running into problems that I suspect are due to the assignment of variables. Here is the beginning of the original script: #!/usr/bin/perl -w ##################################### # gbstrim.pl # John Garbe # June 2016 # # ##################################### =head1 NAME gbstrim.pl – – Trim padding and/or cut… Read More Running perl script and getting "Error in option spec:"

Running perl script and getting "Error in option spec:"

I am very new to running perl scripts and I am running into problems that I suspect are due to the assignment of variables. Here is the beginning of the original script: #!/usr/bin/perl -w ##################################### # gbstrim.pl # John Garbe # June 2016 # # ##################################### =head1 NAME gbstrim.pl – – Trim padding and/or cut… Read More Running perl script and getting "Error in option spec:"

When passing parameters to getopt, does the order must same as the parsing order?

I want to use getopt to parsing my input, such as –count=123 –range=456 –err Here is my test code: argv=$(getopt –name `basename $0` –options ” –longoptions err::,count:,range: — "$@") 2>&1 || show_usage eval "set — ${argv}" echo "debug> [$argv]" while true; do case "$1" in "–count") echo "HitCount=$2" echo "debug> [$1/$2/$3/$4/$5/$6/$7/$8]" shift 2 echo "debug>… Read More When passing parameters to getopt, does the order must same as the parsing order?