in reply to Re: Syntax errors in setting path..
in thread Syntax errors in setting path..

Thanks.Also I just want to use 'msm' as an option,no value should be entered for it,how do I make sure that option msm is given but there should be no value.Will the following work?how to make the options case-insensitive?Thanks
use Getopt::Long; #Getting the command-line options my %options = (); GetOptions (\%options,'msm','des=s', 'a=s', 'd=s', 'r=i', 'v=s'); if($options(msm)){....}

Replies are listed 'Best First'.
Re^3: Syntax errors in setting path..
by Khen1950fx (Canon) on Mar 12, 2011 at 08:10 UTC
    Make msm a flag...
    #!/usr/bin/perl use strict; use warnings; use Getopt::Long; my $string = 'string'; my $length = 'length'; my $msm = 'msm'; my $result = GetOptions ('des=s' => \$string, 'a=s' => \$string, 'd=s' => \$string, 'r=i' => \$length, 'v=s' => \$string, 'msm' => \$msm);
    Or simply my $msm;