good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: passing vars to a subby RazorbladeBidet (Friar) |
on Mar 11, 2005 at 15:04 UTC ( [id://438662]=note: print w/replies, xml ) | Need Help?? |
I highly doubt this is what you want. First there's not a need to enclose in double quotes Second, if you are actually passing an array as your first parameter, that's why your sub isn't working.
This will just get the first value of the array as print_subsystem and the second value as server_name (provided there's more than one value). If you actually want to pass an array as a parameter, pass the reference. Maybe check perlsub for more info. One other thing, very quickly - the string comparison operator is "eq" not "==" Best of luck! Update: As my gusto for immediately diving into the code to help usually overtakes my common sense, in the effort of not leading you down the wrong path, I suggest you follow Joost's suggestions first (that is, post how the code isn't working).
-------------- It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs
In Section
Seekers of Perl Wisdom
|
|