in reply to Getopt::Long result issue

If you want to test if something was passed, you need to test the reference that the options affects. GetOptions doesn't return anything of use.
#!/usr/bin/perl -w use strict; use Getopt::Long; my $fVal = 0; GetOptions( f => \$fVal, ) # if "-f" is used, this will print "1" else "0" print "$fVal\n";