<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 13 Oct 2009, at 19:01, shadih rahman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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></blockquote><div><br></div>Remove the [ ]'s, i.e.</div><div><br></div><div>$plugin->add_arg(<br>    spec       => 'protocol|P=s',<br>    help       => 'snmp protocol',<br>    label      => 'protocol',<br>    default    => '2c' ,<br>    required   => 0,<br>);</div><div><br></div><div><span class="Apple-style-span" style="font-family: Helvetica, sans-serif; ">  Duncs</span></div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" color="#4A0B71" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 16px; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; "><font class="Apple-style-span" color="#4A0B71" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); "><div><div apple-content-edited="true"><span class="Apple-style-span" style="font-family: Calibri; font-size: 15px; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" color="#4A0B71" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 16px; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; "><font class="Apple-style-span" color="#4A0B71"><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="color: rgb(0, 0, 0); "><div> <br class="Apple-interchange-newline">-- </div><div><div apple-content-edited="true"><span class="Apple-style-span" style="font-family: Calibri; font-size: 15px; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" color="#4A0B71" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 16px; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; "><font class="Apple-style-span" color="#4A0B71" face="Helvetica" size="3"><span class="Apple-style-span" style="color: rgb(0, 0, 0); "><div><div apple-content-edited="true"><span class="Apple-style-span" style="font-family: Calibri; font-size: 15px; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" color="#4A0B71" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 16px; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-GB" style="font-size: 12pt; font-family: Arial, sans-serif; color: rgb(74, 11, 113); ">Duncan Ferguson</span><span lang="EN-GB" style="font-size: 14pt; font-family: Arial, sans-serif; color: rgb(74, 11, 113); "><br></span><span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(74, 11, 113); ">Senior Developer</span></div></span></span></font></div></span></div></div></span></font></div></span></span></font></div></span></div></div></span></font></font></div></span></span></font></div></span></div></div></span></span></font></div></span></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span></span><span></span><span></span><span></span><br class="Apple-interchange-newline"><span></span><span><img height="33" width="100" src="cid:image001.gif@01C9231E.D8AA72D0"></span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span lang="EN-GB" style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(74, 11, 113); "><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">Opsera Limited | Unit 69 Suttons Business Park<br>Reading | Berkshire | RG6 1AZ | UK<b><br><br>Phone:   </b>+44 (0) 845 057 7887<br><b>Mobile</b></span><b><span lang="EN-GB" style="font-size: 9pt; font-family: 'Times New Roman', serif; color: rgb(74, 11, 113); ">:   </span></b><span lang="EN-GB" style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(74, 11, 113); ">+44 (0) 7968 148 748<br><b>Skype</b>:   duncan_j_ferguson     <b>Email:</b>   </span><u><span lang="EN-GB" style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(74, 11, 113); "><a href="mailto:duncan.ferguson@opsera.com" style="color: blue; text-decoration: underline; ">duncan.ferguson@opsera.com</a></span></u><b><span style="font-size: 10pt; font-family: Arial, sans-serif; "><br></span></b><span lang="EN-GB" style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(74, 11, 113); "><span style="color: rgb(74, 11, 113); "><a href="http://www.opsera.com/" target="_blank" title="http://www.opsera.com" style="color: blue; text-decoration: underline; ">www.opsera.com</a></span></span></span></span></span></span></span></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px; "><font class="Apple-style-span" color="#C0C0C0"><br></font></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px; "><span class="Apple-style-span" style="font-size: 13px; "><span class="Apple-style-span" style="background-color: transparent; "><font class="Apple-style-span" color="#C0C0C0">Opsera Limited is registered in the </font></span><st1:country-region w:st="on"><st1:place w:st="on"><span class="Apple-style-span" style="background-color: transparent; "><font class="Apple-style-span" color="#C0C0C0">UK</font></span></st1:place></st1:country-region><span class="Apple-style-span" style="background-color: transparent; "><font class="Apple-style-span" color="#C0C0C0"> under Company Number 5396532. Our registered office is Gorse View, Horsell Rise, Woking, </font></span><st1:city w:st="on"><span class="Apple-style-span" style="background-color: transparent; "><font class="Apple-style-span" color="#C0C0C0">Surrey</font></span></st1:city><span class="Apple-style-span" style="background-color: transparent; "><font class="Apple-style-span" color="#C0C0C0">, </font></span><st1:postalcode w:st="on"><span class="Apple-style-span" style="background-color: transparent; "><font class="Apple-style-span" color="#C0C0C0">GU21 4RB</font></span></st1:postalcode><span class="Apple-style-span" style="background-color: transparent; "><font class="Apple-style-span" color="#C0C0C0">.</font></span></span></span></font></div></span> </div></span></span></span></div><br></body></html>