get_status("@SERVERS[$rev_srv_num{$SERVER}]->[2]","$SERVER");


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.

my $print_subsystem=shift; # chomp ($print_subsystem); # not needed my $server_name=shift;


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 reply to Re: passing vars to a sub by RazorbladeBidet
in thread passing vars to a sub by tcf03

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.