LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to pass multiple objects into Perl script? (https://www.linuxquestions.org/questions/programming-9/how-to-pass-multiple-objects-into-perl-script-928073/)

AST 02-07-2012 06:51 AM

How to pass multiple objects into Perl script?
 
Hi,

Completely new to Perl as of 25 minutes ago.

I have a perl script that is used for reporting data.

Currently i have a line that reads

'&host=host1&alerttype=3&hoststate=2&limit=500'

Id like to have multiple hosts

eg

'&host=host1host2host3host4&alerttype=3&hoststate=2&limit=500'

I have tried seperating with a comma but no joy.

Is this possible please?

Thanks

b0uncer 02-07-2012 07:41 AM

There must be a million ways. Depends on how you do do the stuff in general, I'm afraid. See for example this about CGI if that's what you're after (multi-valued parameters) and what you use.


All times are GMT -5. The time now is 11:29 AM.