mohankrishna919
Programmer
#!/usr/bin/perl
#use warnings;
use strict;
use Getopt::Long;
my $level = 'full';
my $loc = 'disk';
my $disp ='bkp';
GetOptions( 'd=s' => \ my $database,
'i=s' => \ my $servername,
'level=s' => \$level,
'location=s' => \$loc,
'disposition=s' => \$disp,
);
how to throw error when I execute this perl file with parameters combination like perl name.pl -level -disposition
during execution if enter values for both these parameters how to throw error.
Please suggest, I am new to perl
#use warnings;
use strict;
use Getopt::Long;
my $level = 'full';
my $loc = 'disk';
my $disp ='bkp';
GetOptions( 'd=s' => \ my $database,
'i=s' => \ my $servername,
'level=s' => \$level,
'location=s' => \$loc,
'disposition=s' => \$disp,
);
how to throw error when I execute this perl file with parameters combination like perl name.pl -level -disposition
during execution if enter values for both these parameters how to throw error.
Please suggest, I am new to perl