Perl references not returning correct values
- by martincarlin87
Hi, this is my first time asking a question here so apologies if I am not following any conventions correctly.
I encountered a bug in some Perl code that basically lost any parameters in the URL after the first name-value pair and the solution was to use the URI::Escape function on the URL.
After this change I decided to move code that does this to a Perl module (Utils.pm) so that any future changes only need to be made once in this file, rather than have to update every file that uses it.
The problem I seem to have is that the user, passwd and priv variables don't seem to return the correct values - the system still allows you to sign in but it can't identify your name or the privileges that you have.
Below is a link to a pastebin of the code I believe to be relevant to the problem.
I believe it is to do with the references but any changes I make just break the page!
If anyone has any ideas I would greatly appreciate the help.
http://pastebin.com/tqGfGutW