I am about ready to rip my hair out now. 
Fixed the form input issue. Values are getting passed to what I have named remote_api.cgi. This doesn’t return a full html document, rather just bare http headers, and some text that updates the page in real time. This works as well.
The problem is something stupidly simple that I can’t seem to get working.
I make a sub named add_nodes_as_replicas, which takes an array as an argument. I thought I had this working when I did it on the command line, but it has since stopped.
I pass an array with node id’s, and it is supposed to either return 0 for success, or a string with an error message. Again, dead simple.
Well…not when I’m involved apparently.
First thing I do is run a test to make sure I got parameters to begin with, so I did:
if(! @_){
return($text{'no_nodes_for_addition'});
}
else{
It passes that condition and goes into the main routine.
my @nodes_for_addition = @{ $_[[0]] };
if(! @nodes_for_addition){
return ("Some useful debugging thing here");
This is where I get tripped up. @nodes_for_addition isn’t getting populated, and I’m afraid it is because of the way I’m passing that array, but I’m not sure. I’m calling it using this syntax: add_nodes_as_replicas(@nodes);
You have to escape the at sign in order to get it to pass at all. If I iterate through @, I can confirm that $[[0]] did get populated, and if I attempt to print $_[[0]], I get this:
ARRAY(0x804dd78)
So it is populated with an array (or at least an array reference?), so then I thought I’d get smart and use @{ $[[0]] }, which again makes sense, but that comes back either undef or null (can’t tell which). Logic tells me that it should print out a space-separated list of the node id’s. I also tried to get smart and do scalar(@{ $[[0]]}), hoping it would give me a count of the number of nodes passed, again, it does not. If I go back to the original routing (prior to passing the array to add_nodes_as_replicas) and print @nodes, I get a space separated list, and scalar(@nodes) does indeed give me a count of the number of id’s in the array.
Which brings me to my conundrum - am I using poor syntax when passing the array as an argument to add_nodes_as_replicas(@array), or am I trying to reference it incorrectly? Perhaps I should be using a pointer in there? I’ve even tried @{ $_[[0]] }->[[0]] in an attempt to get at the first element, no luck. 
Any ideas?