All,<br> I am trying to define an argument in plugin with default value. However whenever I give the argument a default value then it creates an array instead of scalar variable. can someone please tell me how to define a default value for an argument which can be accessed as a scalar? Thanks in advance.<br>
<br><br>argument section<br><br>$plugin->add_arg(<br> spec => 'protocol|P=s',<br> help => [<br> "snmp protocol",<br> ],<br> label => [ 'protocol'],<br>
default => [ '2c' ],<br> required => 0,<br>);<br><br><br>$plugin->getopts;<br>my ( $opts ) =$plugin->opts;<br>my $protocol=$opts->get('protocol');<br><br>Now $protocol contains a pointer to array. I want to $protocol to be just a sclar variable contain the string '2c'<br>
<br clear="all"><br>-- <br>Cordially,<br>Shadhin Rahman<br>