Perl references not returning correct values
Posted
by
martincarlin87
on Stack Overflow
See other posts from Stack Overflow
or by martincarlin87
Published on 2011-02-25T12:33:22Z
Indexed on
2011/02/25
15:25 UTC
Read the original article
Hit count: 407
perl
|references
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.
© Stack Overflow or respective owner