Thanks for the tip.  It worked like a charm.  <br><br><div class="gmail_quote">On Thu, Jul 9, 2009 at 10:39 PM, Thomas Guyot-Sionnest <span dir="ltr"><<a href="mailto:dermoth@aei.ca">dermoth@aei.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<div class="im"><br>
On 08/07/09 05:27 PM, shadih rahman wrote:<br>
> All,<br>
>   how do you parse multiple of same argument in Nagios::Plungin.  I am<br>
> calling my check as this<br>
><br>
</div>> perl check_htturl -H <a href="http://wind.columbia.edu" target="_blank">wind.columbia.edu</a> <<a href="http://wind.columbia.edu" target="_blank">http://wind.columbia.edu</a>> -u<br>
<div class="im">> username -p pass -P /login -q me -q you<br>
><br>
> when I print -q it should print me&you but its not doing that.   This is<br>
> my code.  Please advise on this.  Thanks<br>
><br>
<br>
</div>Nagios::Pluin uses Getopt::Long to parse arguments, so its parameters<br>
are pretty much the same. While I doubt you can force N::P to return an<br>
array you can have Getopt::Long return a array reference.<br>
<div class="im"><br>
> $plugin->add_arg(<br>
>                  spec       => 'query|q=s',<br>
>                  help       => "additional query to inject",<br>
>                  label      => [ 'query' ],<br>
>                  required   => 0,<br>
>              );<br>
<br>
</div>try with:  spec       => 'query|q=s@'<br>
<br>
Since it'll be a ref don't forget to deference it when you get it from<br>
$plugin->opts->query<br>
<br>
- --<br>
Thomas<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br>
iD8DBQFKVqnf6dZ+Kt5BchYRAqyxAJ0YH3qpu5FZxWDzp+mXu2SAc0oyMgCfYwzy<br>
nD7sZohL3qGiv8XnWkPcJjg=<br>
=E5N0<br>
-----END PGP SIGNATURE-----<br>
<br>
------------------------------------------------------------------------------<br>
Enter the BlackBerry Developer Challenge<br>
This is your chance to win up to $100,000 in prizes! For a limited time,<br>
vendors submitting new applications to BlackBerry App World(TM) will have<br>
the opportunity to enter the BlackBerry Developer Challenge. See full prize<br>
details at: <a href="http://p.sf.net/sfu/Challenge" target="_blank">http://p.sf.net/sfu/Challenge</a><br>
_______________________________________________________<br>
Nagios Plugin Development Mailing List <a href="mailto:Nagiosplug-devel@lists.sourceforge.net">Nagiosplug-devel@lists.sourceforge.net</a><br>
Unsubscribe at <a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel</a><br>
::: Please include plugins version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</blockquote></div><br><br clear="all"><br>-- <br>Cordially,<br>Shadhin Rahman<br>